By default, factors are characters and sorted in alphabetical order.
It looks like somehow you numeric data was converted to factors.
Therefore '10' comes before '2'. If you want the factors in numeric
order you have to convert them back. Look in the FAQs.
> x <- c(1,2,3,4,5,10,11,20,21,22,30)
>
Hello all:
I'm sorry to take up bandwidth with easy questions, but as an R
beginner, I continue to be surprised by factors. If someone can shed
some light for me, I'd be grateful:
> d
Total z02801 z02802 z02804 z02806 z02807 z02808 z02809 z02812 z02813
54813 29 51169 236810
2 matches
Mail list logo