Christoph Bier <[EMAIL PROTECTED]> writes: > The following works: > > > median(fbhint.spss1[,264], na.rm=T) > [1] sehr wichtig > Levels: sehr wichtig wichtig teils/teils unwichtig ganz unwichtig > > ... but here it doesn't: > > > median(fbhint.spss1[,566], na.rm=T) > Error in Summary.factor(..., na.rm = na.rm) : > "sum" not meaningful for factors > > I don't have any ideas why! Can somebody give me a hint?
Offhand, I'd guess that the "median" is inbetween two factor levels in one case and not in the other. However, both cases should give an error, especially for unordered factors, but it is not well-defined for ordered factors either. If you want to interpret your factor as a numeric scale, use as.numeric first. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help