-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This is strange - I think?
library(ggplot2)
tf <- which(sapply(diamonds, is.factor))
diamonds.tf <- diamonds[,tf]
So far so good. But next comes the trouble:
pl.f <- ggplot(diamonds.tf, aes(x=diamonds.tf[,i]))+
geom_bar()+
xlab(names(diamonds.tf[i]))
for (i in 1:ncol(diamonds.tf)) {
ggsave(paste("plot…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have the following simple data
data <- structure(list(status = c(9, 5, 9, 10, 11, 10, 8, 6, 6, 7, 10,
10, 7, 11, 11, 7, NA, 9, 11, 9, 10, 8, 9, 10, 7, 11, 9, 10, 9,
9, 8, 9, 11, 9, 11, 7, 8, 6, 11, 10, 9, 11, 11, 10, 11, 10, 9,
11, 7, 8, 8, 9, 4, 11, 11, 8, 7, 7, 11, 11, 11, 6, 7, 11, 6,…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have this data frame:
structure(list(month_num = 1:24, founded_month = c(4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L,
10L, 11L, 12L, 1L, 2L, 3L), founded_year = c(2008L, 2008L, 2008L,
2008L, 2008L, 2008L, 2008L, 2008L, 2008L, 2009L, 2009L, 2009L,
2009L, 2009L,…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've been using ggplot2 for a while now, and I can't find a way to get formula from ggplot object. Though I can get basic info with summary(<ggplot_object>), in order to get complete formula, usually I was combing up and down through .Rhistory file. And this becomes frustrating when you experiment…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am sorry for the non-informative title.
exstatus <- structure(list(org = structure(c(2L, 1L, 7L, 3L, 6L, 2L, 2L,
7L, 2L, 1L, 2L, 2L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 8L, 4L, 2L,
2L, 5L, 7L, 8L, 6L, 2L, 7L, 2L, 2L, 7L, 2L, 2L, 2L, 2L, 4L, 2L,
2L, 1L, 2L, 2L, 7L, 2L, 7L, 2L, 4L, 7L, 2L, 4L, 2L…
>>> More