Message-ID: <CAM_vjunQYhGFMUNaXfNUs-7Z+jM=7RRNyn7KK8UA3FaELu8PRQ@mail.gmail.com>
Date: 2012-11-26T17:02:30Z
From: Sarah Goslee
Subject: wrong data interpretation in R
In-Reply-To: <1353945576272-4650849.post@n4.nabble.com>
Most likely there's something amiss in your csv file: R won't convert
numeric data to factors unless there are non-numeric characters
included.
First check your csv file for errors. If that doesn't solve your
problem, please provide a reproducible example.
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Sarah
On Mon, Nov 26, 2012 at 10:59 AM, EcoFranc <robrit at gmx.de> wrote:
> Hi,
>
> maybe somebody would be kind enough to help a bloody and unprofessional
> beginner like me (and I hope I did not overlook the answer to my question on
> the website). I've imported a csv data frame into R, but I can't run a
> regression because R interprets 4 out of 5 variables as factors (rather than
> numeric vectors). I tried the as.numeric() command, but R says it is invalid
> to change the storage mode of a factor. Is there any way to change the mode
> of a factor into numeric.
>
> I am very grateful for help. Thank you very much, Robert.
>
>
--
Sarah Goslee
http://www.functionaldiversity.org