Skip to content
Prev 247737 / 398513 Next

Odp: count of factors

Hi

r-help-bounces at r-project.org napsal dne 19.01.2011 09:51:43:
<snip>
number
Centracanthidae
Use levels
make new column 
fish_transect$familia2 <- fish_transect$familia

change levels
levels(fish_transect$familia2)[which(table(fish_transect$familia2)<46)]<-"other"

You can use any threshold number.

Regards
Petr

BTW you need to have familia as factor not as character variable.
of
factor,
other
do it
learn a
http://r.789695.n4.nabble.com/count-of-factors-
http://www.R-project.org/posting-guide.html