[R] concatenating factor from list

Sebastian Luque spluque at gmail.com
Thu Mar 16 01:04:01 CET 2006


"Gabor Grothendieck" <ggrothendieck at gmail.com> wrote:

> Is this ok or is it what you are trying to avoid:

> factor(unlist(lapply(cutYield, as.character)))

Thank you Gabor.  The problem with that is what if some levels do not
appear in any member of cutYield?  In that case, the factor created above
would contain fewer levels than those present in every member of cutYield.

Cheers,

-- 
Sebastian P. Luque




More information about the R-help mailing list