Skip to content
Prev 32509 / 398502 Next

help with subset(), still original dataframe in tapply

Frank Mattes <f.mattes at rfc.ucl.ac.uk> writes:
A subset of a three-level factor is still a three-level factor. If you
want it to become a factor with only those levels that are present in
data, you need to say so, e.g. with

tapply(newex$REL,factor(newex$UID),mean)
It doesn't.