Nancy - The separator in these files is the comma, not the semicolon. Try
train = read.csv('trainingset.txt',check.names=FALSE) test = read.csv('testset.txt',check.names=FALSE) - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spec...@stat.berkeley.edu On Tue, 15 Dec 2009, Nancy Adam wrote:
Hi all,Thanks for your reply. Sorry I did not send sufficient information about my problem…I attach the two datasets that I’m trying to read and these are my attempts to read them:1)#train <- read.table("trainingset.txt", header=TRUE, sep=";" ,fill=TRUE) #test <- read.table("testset.txt", header=TRUE, sep=";" , fill=TRUE)its error message is: “ undefined columns selected”2)train <- scan("trainingset.txt", sep=";" ,fill=TRUE) test <- scan("testset.txt", sep=";" , fill=TRUE) its error message is: “ 'names' attribute [172] must be the same length as the vector [152]” many thanks, Nancy _________________________________________________________________
______________________________________________ R-help@r-project.org 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.