Am 25.04.2011 09:58, schrieb Georgina Salazar:
Hi!

I have the data in a tab delimited text file titled "ken_data_try_anova." I
tried to import it into R entering

read.delim(ken_data_try_anova)

but received the error message

Error in read.table(file = file, header = header, sep = sep, quote = quote,  :
   object 'ken_data_try_anova' not found

I have another file called 10423nad.txt.

I tried
data<-as.matrix(read.table(C:\Users\gtsalazar1979\Documents\TANOVA_1.0.0\10423nad.txt))
)

You shall escape filenames with quotes:
read.delim("ken_data_try_anova")

Otherwise R thinks you have a variable named ken_data_try_anova. But you need a string containing the filename (and the difference between strings and variables are the quotes).
The following, for example, would also work:

derp <- "ken_data_try_anova"
read.delim(derp)

What you also want to do, is not only read the table, but also store it in a data frame:

mydata <- read.delim("ken_data_try_anova")

Have fun,
 Alex

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to