Question: problem in read.table
gravatar for Hui-Yi Chu
10.5 years ago by
Hui-Yi Chu160
Hui-Yi Chu160 wrote:
Dear list, I got a weird problem when I tried to use read.table to import my data matrix for drawing heatmaps. I have two different txt files generated in same way. The first one worked fine when imported into R using code1(listed below), and the second one got lots of warning messages using code2 (codes are almost same but file names changed). I have checked the whole process again and again, these two files do have no obvious difference except the genes. I have already searched the google and maillist but still have no idea what's wrong. Can anybody give me some clues? Thank you very much!! ## code1 hmap1 <- read.table("For heatmap_annot_limma_P0.001_txn.f.txt", header=TRUE, sep="\t", row.names=1) eset1 <- new("ExpressionSet", exprs=as.matrix(hmap1)) ; dim(exprs(eset1)) ### got correct dim as original matrix -- [1] 416 4 ## code2 hmap2 <- read.table("For heatmap_annot_limma_P0.001_txn.S.txt", header=TRUE, sep="\t", row.names=1) eset2 <- new("ExpressionSet", exprs=as.matrix(hmap2)) ; dim(exprs(eset2)) Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : number of items read is not a multiple of the number of columns All suggestions are really appreciated!! Hui-Yi [[alternative HTML version deleted]]
ADD COMMENTlink written 10.5 years ago by Hui-Yi Chu160
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 312 users visited in the last hour