Telegram Group & Telegram Channel
Релиз patchwork 1.3.0

Вышла версия patchwork 1.3.0, которая привнесла интересные возможности для работы с таблицами в графических композициях. Теперь можно легко интегрировать таблицы gt с графиками, используя функции wrap_elements() и wrap_table(). Пример простого графика с таблицей:

library(patchwork)
library(ggplot2)
library(gt)

p1 <- ggplot(airquality) +
geom_line(aes(x = Day, y = Temp, colour = month.name[Month])) +
labs(colour = "Month")

aq <- airquality[sample(nrow(airquality), 10), ]
p1 + wrap_table(aq, space = "free_y")


Также доступны более продвинутые возможности для компоновки графиков и таблиц. Например, можно использовать сложный макет с элементами разного размера:

p1 <- ggplot(mtcars) +
geom_point(aes(mpg, disp)) +
ggtitle('Scatter plot')

p2 <- ggplot(mtcars) +
geom_bar(aes(factor(cyl))) +
ggtitle('Bar plot')

layout <- c(
area(t = 1, l = 1, b = 2, r = 2),
area(t = 1, l = 3, b = 2, r = 3)
)

p1 + p2 + plot_layout(design = layout)


Это позволяет гибко управлять макетом визуализации, комбинируя таблицы и графики разных типов.

Ссылки:
● Подробнее можно прочитать в оригинальной статье на Tidyverse Blog.
● Также ранее я уже рассказывал о пакете patchwork в посте "Как расположить несколько ggplot2 графиков на одном изображении".

#новости_и_релизы_по_R



group-telegram.com/R4marketing/1325
Create:
Last Update:

Релиз patchwork 1.3.0

Вышла версия patchwork 1.3.0, которая привнесла интересные возможности для работы с таблицами в графических композициях. Теперь можно легко интегрировать таблицы gt с графиками, используя функции wrap_elements() и wrap_table(). Пример простого графика с таблицей:

library(patchwork)
library(ggplot2)
library(gt)

p1 <- ggplot(airquality) +
geom_line(aes(x = Day, y = Temp, colour = month.name[Month])) +
labs(colour = "Month")

aq <- airquality[sample(nrow(airquality), 10), ]
p1 + wrap_table(aq, space = "free_y")


Также доступны более продвинутые возможности для компоновки графиков и таблиц. Например, можно использовать сложный макет с элементами разного размера:

p1 <- ggplot(mtcars) +
geom_point(aes(mpg, disp)) +
ggtitle('Scatter plot')

p2 <- ggplot(mtcars) +
geom_bar(aes(factor(cyl))) +
ggtitle('Bar plot')

layout <- c(
area(t = 1, l = 1, b = 2, r = 2),
area(t = 1, l = 3, b = 2, r = 3)
)

p1 + p2 + plot_layout(design = layout)


Это позволяет гибко управлять макетом визуализации, комбинируя таблицы и графики разных типов.

Ссылки:
● Подробнее можно прочитать в оригинальной статье на Tidyverse Blog.
● Также ранее я уже рассказывал о пакете patchwork в посте "Как расположить несколько ggplot2 графиков на одном изображении".

#новости_и_релизы_по_R

BY R4marketing | канал Алексея Селезнёва | Язык R




Share with your friend now:
group-telegram.com/R4marketing/1325

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

Some people used the platform to organize ahead of the storming of the U.S. Capitol in January 2021, and last month Senator Mark Warner sent a letter to Durov urging him to curb Russian information operations on Telegram. However, the perpetrators of such frauds are now adopting new methods and technologies to defraud the investors. "We as Ukrainians believe that the truth is on our side, whether it's truth that you're proclaiming about the war and everything else, why would you want to hide it?," he said. "The inflation fire was already hot and now with war-driven inflation added to the mix, it will grow even hotter, setting off a scramble by the world’s central banks to pull back their stimulus earlier than expected," Chris Rupkey, chief economist at FWDBONDS, wrote in an email. "A spike in inflation rates has preceded economic recessions historically and this time prices have soared to levels that once again pose a threat to growth." "Markets were cheering this economic recovery and return to strong economic growth, but the cheers will turn to tears if the inflation outbreak pushes businesses and consumers to the brink of recession," he added.
from us


Telegram R4marketing | канал Алексея Селезнёва | Язык R
FROM American