Entering edit mode
Hui-Yi Chu
▴
160
@hui-yi-chu-2954
Last seen 10.2 years ago
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]]