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

Right now the digital security needs of Russians and Ukrainians are very different, and they lead to very different caveats about how to mitigate the risks associated with using Telegram. For Ukrainians in Ukraine, whose physical safety is at risk because they are in a war zone, digital security is probably not their highest priority. They may value access to news and communication with their loved ones over making sure that all of their communications are encrypted in such a manner that they are indecipherable to Telegram, its employees, or governments with court orders. For example, WhatsApp restricted the number of times a user could forward something, and developed automated systems that detect and flag objectionable content. Telegram, which does little policing of its content, has also became a hub for Russian propaganda and misinformation. Many pro-Kremlin channels have become popular, alongside accounts of journalists and other independent observers. The message was not authentic, with the real Zelenskiy soon denying the claim on his official Telegram channel, but the incident highlighted a major problem: disinformation quickly spreads unchecked on the encrypted app. During the operations, Sebi officials seized various records and documents, including 34 mobile phones, six laptops, four desktops, four tablets, two hard drive disks and one pen drive from the custody of these persons.
from pl


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