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
👍134🔥4



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: |

Groups are also not fully encrypted, end-to-end. This includes private groups. Private groups cannot be seen by other Telegram users, but Telegram itself can see the groups and all of the communications that you have in them. All of the same risks and warnings about channels can be applied to groups. The gold standard of encryption, known as end-to-end encryption, where only the sender and person who receives the message are able to see it, is available on Telegram only when the Secret Chat function is enabled. Voice and video calls are also completely encrypted. In February 2014, the Ukrainian people ousted pro-Russian president Viktor Yanukovych, prompting Russia to invade and annex the Crimean peninsula. By the start of April, Pavel Durov had given his notice, with TechCrunch saying at the time that the CEO had resisted pressure to suppress pages criticizing the Russian government. False news often spreads via public groups, or chats, with potentially fatal effects. Overall, extreme levels of fear in the market seems to have morphed into something more resembling concern. For example, the Cboe Volatility Index fell from its 2022 peak of 36, which it hit Monday, to around 30 on Friday, a sign of easing tensions. Meanwhile, while the price of WTI crude oil slipped from Sunday’s multiyear high $130 of barrel to $109 a pop. Markets have been expecting heavy restrictions on Russian oil, some of which the U.S. has already imposed, and that would reduce the global supply and bring about even more burdensome inflation.
from us


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