subset

R 101: The Subset Function

November 9, 2011 |

The subset function is available in base R and can be used to return subsets of a vector, martix, or data frame which meet a particular condition. In my three years of using R, I have repeatedly used the subset() function and believe that it is the most useful tool ... [Read more...]

More fun with boxplots

May 19, 2011 |

Here are a few more plotting options for boxplots: Let’s start plotting the full set plot(b$mod, b$x) Plot labels for a subset in full set plot (label all points x __ -1) text(subset(b$mod, b$x __ -1), subset(b$x, b$x __ -1), … Continue reading → [Read more...]

Example 8.4: Including subsetting conditions in output

September 7, 2010 |

A number of analyses perform operations on subsets. Making it clear what observations have been excluded or included is helpful to include in the output.SASThe where statement (section A.6.3) is a powerful and useful tool for subsetting on the fly. (...