R GRAPHICS TRICK !!! #shorts #rstats #datavisualization #dataviz #programming #ggplot2

preview_player
Показать описание
How to divide a ggplot2 scatterplot into groups using the facet_wrap() function in the R programming language.
R code of this video:

x = c(rnorm(300),
rnorm(300, 3, 2),
rnorm(300, 0, 5)),
y = c(rnorm(300),
rnorm(300, 1, 5),
rnorm(300, 3, 0.5)),
group = rep(LETTERS[1:3],
each = 300)
)

library("ggplot2")

ggp <- ggplot(data, aes(x, y)) +
geom_point()
ggp

ggp +
facet_wrap(group ~ .)

Follow me on Social Media:

Рекомендации по теме
Комментарии
Автор

Can you please tell me in which package can I get 'seqforpower'function

nitinsingh
welcome to shbcf.ru