Re: [R] how as.numeric() !- factor

2003-08-03 Thread Tony Plate
The problem is that the 2nd column in your data frame has been converted into a factor. This happened because you used cbind() with mixed character and numeric vectors. cbind() with these types of arguments will construct a character matrix. Then when you passed that character matrix to

[R] how as.numeric() !- factor

2003-07-31 Thread Tord Snall
Dear all, I have divided two vectors: Np.occup97.98- as.data.frame(cbind(site = levels(sums$site), Np.occup97.98 = sums$Ant.Nptrad97.98/Ant.trad$Ant.trad97.98)) Np.occup97.98 site Np.occup97.98 1 erken97 0.342592592592593 2 erken98 0.333 3 rormyran

Re: [R] how as.numeric() !- factor

2003-07-31 Thread Prof Brian Ripley
You would have been helped by looking in the FAQ: please do so now. Also, ?factor tells you not to use as.numeric. On Thu, 31 Jul 2003, Tord Snall wrote: Dear all, I have divided two vectors: Np.occup97.98- as.data.frame(cbind(site = levels(sums$site), Np.occup97.98 =