If you're learning R, learn to use dplyr for data manipulation and ggplot2 for plotting. Both will save you a lot of time.
If you're learning R, learn to use dplyr for data manipulation and ggplot2 for plotting. Both will save you a lot of time.
Like a lot of good tools, it seems that ggplot2 makes the common case extremely easy, but it can be a struggle to make it work in uncommon situations.
> s2 <- data.frame(x=c(1,2,3,4), y=c(6,7,6,7), series=rep("s2", 4))
> s <- rbind(s1, s2)
> qplot(x, y, data=s, geom=c('point', 'line'), color=series)
Edit: I had mentioned data.table as being better than dplyr for performance reasons, but it has a unique learning curve and isn't really good for beginners
I had been learning data.table, but I really like dplyr's % operator and the compositional functions better. I think I'm going to make the move to dplyr.
data.table is not just fast, but is also more memory efficient - we want to highlight in the vignettes as well.
And timings are quite relevant even on 10 million rows: https://gist.github.com/arunsrinivasan/db6e1ce05227f120a2c9
For much larger data, check the project page: https://github.com/Rdatatable/data.table/wiki/Benchmarks-%3A...