Hi, I'm relatively new to R, so I don't know the full list of base (or popular add-on packages) functions and tools available. For example, I tripped across mention of rle() in a message about some other problem. rle() turned out to be a handy shortcut to splitting some of my data by magnitude (vaguely like a sequence-based histogram). So I thought I'd ask: what small, or obscure, tools and functions in R do you find handy or 'cool' to use in your work? Thanks Carl
The two sets of packages I use a lot for their utility functions and for making my day-to-day analysis and reporting easier are Hmisc and Design by Frank Harrell and {gdata,gmodels,gplots} by Greg Warnes. Frank's packages have good documentation and cover a pretty good range of regression methods as well as a refined set of report-writing tools (see http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/RS for more). These aren't "obscure" or "small" tools, but very useful and "cool" tools I use regularly. Greg and Frank can thank me later for the free plug :-D :-D Abhijit Carl Witthoft wrote:> Hi, > I'm relatively new to R, so I don't know the full list of base (or > popular add-on packages) functions and tools available. For example, > I tripped across mention of rle() in a message about some other > problem. rle() turned out to be a handy shortcut to splitting some of > my data by magnitude (vaguely like a sequence-based histogram). > So I thought I'd ask: what small, or obscure, tools and functions in R > do you find handy or 'cool' to use in your work? > > Thanks > Carl > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Which packages you need is crucially dependent on what you want to do. There is not likely a general answer. Googling for CRAN Task Views should get you to package views which list packages applicable to different areas. Prior to installing any R packages yourself library() will list the recommended packages which are the ones that ship with R itself. On Sat, Jun 7, 2008 at 10:16 AM, Carl Witthoft <carl at witthoft.com> wrote:> Hi, > I'm relatively new to R, so I don't know the full list of base (or popular > add-on packages) functions and tools available. For example, I tripped > across mention of rle() in a message about some other problem. rle() turned > out to be a handy shortcut to splitting some of my data by magnitude > (vaguely like a sequence-based histogram). > So I thought I'd ask: what small, or obscure, tools and functions in R do > you find handy or 'cool' to use in your work? > > Thanks > Carl > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
At 15:16 07/06/2008, Carl Witthoft wrote:>Hi, >I'm relatively new to R, so I don't know the full list of base (or >popular add-on packages) functions and tools available. For >example, I tripped across mention of rle() in a message about some >other problem. rle() turned out to be a handy shortcut to splitting >some of my data by magnitude (vaguely like a sequence-based histogram). >So I thought I'd ask: what small, or obscure, tools and functions in >R do you find handy or 'cool' to use in your work?In a similar vein to your comment about rle (which I found in the same way as you and for which I would never have thought of looking) perhaps I could suggest str()? I picked this up by reading R-help. When R's behaviour is unexpected (to you) using str(your_dataframe) often reveals why. And for a bonus 1 - if the function has a data= parameter then always use it 2 - use with() rather than attaching and detaching things These have saved me hours.>Thanks >Carl > >Michael Dewey http://www.aghmed.fsnet.co.uk