Stupid R tricks: using outer to create many data.frame subsets

February 11, 2012

(This article was first published on Jesse S.A. Bridgewater » rstats, and kindly contributed to R-bloggers)

Selecting subsets of a data.frame is easy in R if you define the predicates manually. But if you need to define many conditions the standard slicing and subsetting methods are cumbersome. For this illustration I want to pick some large number of numerical ranges and label all of the rows that match any of the […]

To leave a comment for the author, please follow the link and comment on his blog: Jesse S.A. Bridgewater » rstats. offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.