wrong data interpretation in R
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