mode(x) <- "numeric"
>
> which I assume is what is causing that function to fail with the same
> error message as above. I shall post separately to the list for spdep.
>
> Alun
>
> -----Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>
dnesday, 7 November 2007 8:04 AM
To: Alexandre Santos
Cc: r-help@r-project.org
Subject: Re: [R] Problem with a non-factor,non-numeric variable in a
data.frame
Alexandre,
Try rereading FAX 7.10, it explains why as.numeric() won't do it:
"In any case, do not call as.numeric() or th
Alexandre,
Try rereading FAX 7.10, it explains why as.numeric() won't do it:
"In any case, do not call as.numeric() or their likes directly for the
task at hand as as.numeric() or unclass() give the internal codes"
I.e., the INTERNAL CODE of the factor is what as.numeric() is working
on rather t
I tested
as.numeric(as.character(Ratio))
and it works perfectly!
I still don't get why as.numeric(Ratio) was not enough, but at least
now I know how to deal with it.
Thanks for the tip, and sorry for missing the R-FAQ issue 7.10.
Cheers,
Alexandre Santos
2007/11/6, John Kane <[EMAIL PROTECTE
Have a look at the R-FAQ issue 7.10. It's a standard
problem
For more information about your variable try
str(variable).
--- Alexandre Santos <[EMAIL PROTECTED]>
wrote:
> Dear R list,
>
> I would like to perform an ANOVA in a set of
> measurements, but I have
> problems formatting the data.
Dear R list,
I would like to perform an ANOVA in a set of measurements, but I have
problems formatting the data.
The data is a two dimensional array containing two columns:
- "Stim" : the type of stimulation (string)
- "Ratio" : a ratio of two numeric values
Now, because some values are missing
6 matches
Mail list logo