[R] factor or not factor that is a question
Petr Pikal
petr.pikal at precheza.cz
Thu Jan 19 16:06:09 CET 2006
Dear all
I encountered strange problem with split factor. I tried to use
boxplot(split(aaaa, factor)) but I got an error message
> split(test$asar,kvartaly)
Error in split(x, f) : second argument must be a factor
> str(kvartaly)
Factor w/ 8 levels "1Q.04","2Q.04",..: 1 1 1 1 1 1 1 1 1 1 ...
> str(test$asar)
num [1:731] 16.8 16.6 16.6 16.4 16.7 ...
> is.factor(kvartaly)
[1] TRUE
****************************************
I used formula interface
boxplot(formula) which worked OK.
What can be wrong with my factor kvartaly? Where to look? Why it is
not accepted by split?
W2000
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 2.1
year 2005
month 12
day 20
svn rev 36812
language R
>
Best regards.
Petr Pikal
petr.pikal at precheza.cz
More information about the R-help
mailing list