subset.validlevels | R Documentation |
Subset a data.frame by group y where each level has to be larger than size x
## S3 method for class 'validlevels'
subset(x, group, mincounts)
x |
data.frame: The data.frame to subset |
group |
character vector: the columnname of the data frame to build groups from |
mincounts |
numeric vector: the minimal size allowed for a group zo stay in the dataframe |
dataframe
Stefan Bartels, email@biobits.eu
ID1<-c(2,3,45,343,34,8,77,88,90)
ID2<-c("A","A","B","C","C","C","D","D","D")
df<-data.frame(ID1,ID2)
df<-subset.validlevels(df,"ID2",3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.