Subsetting made easy

Calculating characteristics such as median, mean,... of a subset of data is quite straightforward in R: For a data set containing results from several "models", a subset for the model "base" is created by
base_only <- subset(all, all$model == "base")
Then, the median of the variable "data" can be computed via

About greg

Atmospheric chemistry researcher and university teacher. Data analysis/chemometrics specialist (PCA, PCR, Cluster analysis, SOM)
This entry was posted in r, research and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *