[R] filter factors with min. freq
ligges at statistik.uni-dortmund.de
Thu Aug 21 10:02:29 CEST 2003
Christian Schulz wrote:
> i use a data.frame with ~ 80.000 observations
> and one attribute is a factor with
> ~ 7300 levels. Is there a easy step which allow
> me to filter out the the data with minimum frequencies i.e. 20
> cases per level.
> So existing levels with < 20 cases in this factor attribute are deleted
> from data.frame.
> many thanks and regards,
Why not calculating a table for that factor and removing those levels
with n_i < 20 ?
More information about the R-help