On Nov 10, 2007 12:19 AM, affy snp <[EMAIL PROTECTED]> wrote: > Thanks Jim. > > I tried: > > A<-read.table(file="243_47mel_withnormal_expression_log2.txt", > +header=TRUE,row.names=1,colClasses=c('factor', rep('numeric',486))) > > by specifying colClass but it did not work. > > The error message I got is: > > > A<-read.table(file="243_47mel_withnormal_expression_log2.txt",header=TRUE,row.names=1,colClasses=c('factor', > > rep('numeric',486))) > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : > scan() expected 'a real', got 'B' >
That's because you have only specified 487 variables to colClasses but there are actually 488 variables since the row names count. See the colClasses entry of ?read.table where it is explained. ______________________________________________ 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.