You may be haning Ion coerced into a factor. Have a
look at
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/98260.html
for some discussion of this.
I find that I usually set
options(stringsAsFactors = FALSE) just because of
this but as Gabor points out it may have its own
disadvantages in shar
As Tony assumed: a data frame.
Joh
John Kane wrote:
> What was spectrum orginally?
>
>
> --- Johannes Graumann <[EMAIL PROTECTED]>
> wrote:
>
>> Why is class(spectrum[["Ion"]]) after this "factor"?
>>
>> spectrum <- cbind(spectrum,Ion=rep("",
>> nrow(spectrum)),Deviation.AMU=rep(0.0,
>> nrow
What was spectrum orginally?
--- Johannes Graumann <[EMAIL PROTECTED]>
wrote:
> Why is class(spectrum[["Ion"]]) after this "factor"?
>
> spectrum <- cbind(spectrum,Ion=rep("",
> nrow(spectrum)),Deviation.AMU=rep(0.0,
> nrow(spectrum)))
>
> slowly going crazy ...
>
> Joh
>
> _
Yep, but I figured that out quite fast ;0)
Thanks for giving me a hand ... you want believe a many times I skimmed the
cbind help without actually seeing this ... well, it was 0:30 ...
Thanks again, Joh
Tony Plate wrote:
> Whoops, it looks like there's a typo in ?cbind (R version 2.6.0 Patched
>
Whoops, it looks like there's a typo in ?cbind (R version 2.6.0 Patched
(2007-10-11 r43143)), and I blindly copied it into my message.
That should read (emphasis added):
"and convert character columns to factors unless stringsAsFactors =
***FALSE***"
Here's an example:
> x <- data.frame(X=1:
From ?cbind:
Data frame methods
The cbind data frame method is just a wrapper for data.frame(...,
check.names = FALSE). This means that it will split matrix columns in data
frame arguments, and convert character columns to factors unless
stringsAsFactors = TRUE is passed.
(I'm guessing 'spect
Why is class(spectrum[["Ion"]]) after this "factor"?
spectrum <- cbind(spectrum,Ion=rep("",
nrow(spectrum)),Deviation.AMU=rep(0.0, nrow(spectrum)))
slowly going crazy ...
Joh
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
7 matches
Mail list logo