Re: [R] HELP - as.numeric changing column data

2016-01-06 Thread William Dunlap via R-help
By the way, here is an example where the advice in FAQ 7.10 (change the factor columns to numeric) would give incorrect results. The incorrect header setting in the call to read.table causes an extra row of non-numeric data to appear at the start of the imported data. > txt <- "ColA ColB\n101 1

Re: [R] HELP - as.numeric changing column data

2016-01-06 Thread William Dunlap via R-help
You may have read in your data incorrectly - a column you expected to be numeric was not recognized as such so it was read in a character and then converted to a 'factor'. FAQ 7.10 tells how to work around the problem https://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numer

[R] HELP - as.numeric changing column data

2016-01-06 Thread Andy Schneider
Hi - I'm trying to plot some data and having a lot of trouble! I have a simple dataset consisting of two columns - income_per_capita and mass_beauty_value. When I read the data in and plot it, I get the attached plot Mass Beauty Non-Numeric: