Janet Gannon wrote:

I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use "as.is", but the specifics escape me.
I have used x<-read.table("clipboard", header=F) to import from a txt file. How do make this numeric? Thanks, J.


So the elements of your data frame "x" are not numeric? read.table() auto-detects which variables are numeric or not, so there's something strange with your textfile, I guess.

  as.numeric(x$V1)
converts the first element in your data.frame x to numeric.

Uwe Ligges

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to