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

In normal circumstances, your example works, but sometimes you need special options, e.g sep="\t" if you have missing values or dec="," in countries with comma as decimal delimiter. Another possibility is, that read.table has converted your data into factors, then convert them back, via:


x$V1 <- as.numeric(as.character(x$V1))

etc...

For more options please read the R Data Import/Export manual.

Thomas

______________________________________________
[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