quarta-feira, 30 de maio de 2018

Looking for great visualizations with R? Look no further...

Ever needed that great graph for a R analysis and impress your ever complaing boss? Well, here it is: http://www.r-graph-gallery.com.

R-GRAPH-GALLERY gathers (almost) all possible graphs, displaying the possibilities in a organized way.

Here is a sample that I found interesting using co-relation:

library(ggplot2)
data=data.frame(cond = rep(c("condition_1", "condition_2"), each=10), my_x = 1:100 + rnorm(100,sd=9), my_y = 1:100 + rnorm(100,sd=16) )
ggplot(data, aes(x=my_x, y=my_y)) + geom_point(shape=1)
ggplot(data, aes(x=my_x, y=my_y)) +    geom_point(shape=1) +  geom_smooth(method=lm , color="red", se=FALSE)  # Add linear regression line
ggplot(data, aes(x=my_x, y=my_y)) +    geom_point(shape=1) +  geom_smooth(method=lm , color="red", se=TRUE)




Nenhum comentário:

Postar um comentário

thank you!