Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Duplicate thread: I just installed the latest version of R. What packages should I obtain?

What are the R packages you couldn't imagine your daily work with data? Please list both general and specific tools.

UPDATE: As for 24.10.10 ggplot2 seems to be the winer with 7 votes.

Other packages mentioned more than one are:

  • plyr - 4
  • RODBC, RMySQL - 4
  • sqldf - 3
  • lattice - 2
  • zoo - 2
  • Hmisc/rms - 2
  • Rcurl - 2
  • XML - 2

Thanks all for your answers!

share|improve this question
Very subjective question: this question cannot be answered, and is not suitable for a QA site. – Egon Willighagen Jul 19 '10 at 19:58
2  
Should probably be community wiki; useful question here but doesn't have definitive answer. – Shane Jul 19 '10 at 20:05
2  
@Shane: good point. moved. @ Egon: subjective indeed. but if the answers come from knowledgeable people i don't mind dose of subjectivity. i've started learning R quite recently and have couple of dozens installed to explore, however i notice that there are tools that I use much more often irrespectively of the task at hand. – radek Jul 19 '10 at 20:06
It would be interesting if StackExchange could support some method of linking community wiki posts across sites. Because I will bet this question has been asked on Stackoverflow and I also think that Statistical Analysis may attract some people that wouldn't usually visit SO. – Sharpie Jul 19 '10 at 20:19
@Sharpie: there have been several interesting SO posts like stackoverflow.com/questions/1295955/… or stackoverflow.com/questions/1535021/… however they are not focused on packages. and i agree, linkage of community wiki could be really useful. – radek Jul 19 '10 at 20:37

23 Answers

up vote 21 down vote accepted

I use plyr and ggplot2 the most on a daily basis.

I also rely heavily on time series packages; most especially, the zoo package.

share|improve this answer
1  
+1 for ggplot2 - by far best graphs you can get – radek Jul 19 '10 at 19:59
why is this answer not community wiki ? – robin girard Aug 9 '10 at 8:18
@robin: must be a bug; since my answer (and several of the others) were given before the question was made CW. – Shane Aug 9 '10 at 14:37

multicore is quite nice for tool for making faster scripts faster.
cacheSweave saves a lot of time when using Sweave.

share|improve this answer
+1 for multicore - very useful indeed – radek Jul 20 '10 at 16:02

ggplot2 - hands down best visualization for R.

RMySQL/RSQLite/RODBC - for connecting to a databases

sqldf - manipulate data.frames with SQL queries

Hmisc/rms - packages from Frank Harrell containing convenient miscellaneous functions and nice functions for regression analyses.

GenABEL - nice package for genome-wide association studies

Rcmdr - a decent GUI for R if you need one.

Also check out CRANtastic - this link has a list of the most popular R packages. Many on the top of the list have already been ment

share|improve this answer
+1 for RODBC and sqldf - i find them essential as well – radek Jul 20 '10 at 16:02

I use the xtable package. The xtable package turns tables produced by R (in particular, the tables displaying the anova results) into LaTeX tables, to be included in an article.

share|improve this answer

data.table is my favorite now! Very look forward to the new version with the more wishlist implemented.

share|improve this answer

Packages I often use are raster, sp, spatstat, vegan and splancs. I sometimes use ggplot2, tcltk and lattice.

share|improve this answer

For me personally, I use the following three packages the most, all available from the awesome Omega Project for Statistical Computing (I do not claim to be an expert, but for my purposes they are very easy to use):

  • RCurl: It has lots of options which allows access to websites that the default functions in base R would have difficulty with I think it's fair to say. It is an R-interface to the libcurl library, which has the added benefit of a whole community outside of R developing it. Also available on CRAN.

  • XML: It is very forgiving of parsing malformed XML/HTML. It is an R-interface to the libxml2 library and again has the added benefit of a whole community outside of R developing it Also available on CRAN.

  • RJSONIO: It allows one to parse the text returned from a json call and organise it into a list structure for further analysis.The competitor to this package is rjson but this one has the advantage of being vectorised, readily extensible through S3/S4, fast and scalable to large data.
share|improve this answer
+1 for omegahat - very good source – radek Jul 27 '10 at 13:41
Well, RCurl and XML and both on CRAN too... – Dirk Eddelbuettel Jul 27 '10 at 16:47
@Dirk yes, that is correct, have edited my answer to include this information, cheers. – Tony Breyal Jul 28 '10 at 10:00

Sweave lets you embed R code in a LaTeX document. The results of executing the code, and optionally the source code, become part of the final document.

So instead of, for example, pasting an image produced by R into a LaTeX file, you can paste the R code into the file and keep everything in one place.

share|improve this answer
Just a hint for all those who want to get started on reproducible research with R. I would advice you to have a look at the newish package knitr instead of Sweave. It's basically Sweave on steroids. It is as easy, if not easier, to learn and far more flexible. – Christoph_J Feb 18 at 21:05

zoo and xts are a must in my work!

share|improve this answer

I find lattice along with the companion book "Lattice: Multivariate Data Visualization with R" by Deepayan Sarkar invaluable.

share|improve this answer

If you are doing any kind of predictive modeling, caret is a godsend. Especially combined with the multicore package, some pretty amazing things are possible.

share|improve this answer

I could not live without:

  • lattice for graphics
  • xlsx or XLConnect for reading Excel files
  • rtf to create reports in rtf format (I would prefer Sword or R2wd but I cannot install statconn at work; I will surely try odfWeave soon.)
  • nlme and lme4 for mixed models
  • ff for working with large arrays
share|improve this answer

RColorBrewer has not been mentioned here, I use it often for plotting if I need color schemes

share|improve this answer

Day-to-day the most useful package must be "foreign" which has functions for reading and writing data for other statistical packages e.g. Stata, SPSS, Minitab, SAS, etc. Working in a field where R is not that commonplace means that this is a very important package.

share|improve this answer

I use

car, doBy, Epi, ggplot2, gregmisc (gdata, gmodels, gplots, gtools), Hmisc, plyr, RCurl, RDCOMClient, reshape, RODBC, TeachingDemos, XML.

a lot.

share|improve this answer

RODBC for accessing data from databases, sqldf for performing simple SQL queries on dataframes (although I am forcing myself to use native R commands), and ggplot2 and plyr

share|improve this answer

I work with both R and MATLAB and I use R.matlab a lot to transfer data between the two.

share|improve this answer

We mostly use:

  • ggplot - for charts
  • stats
  • e1071 - for SVMs
share|improve this answer
You may also want to check out kernlab and caret for SVMs. They're interesting (thought not necessarily better) alternatives. – Zach May 8 '11 at 2:27

lattice, car, MASS, foreign, party.

share|improve this answer

For me I am using kernlab for Kernel-based Machine Learning Lab and e1071 for SVM and ggplot2 for graphics

share|improve this answer

I use ggplot2, vegan and reshape quite often.

share|improve this answer

I like roxygen for its Curry() function.

share|improve this answer

I use ggplot2, reshape, lattice, knitr more often.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.