Displaying 1 result from an estimated 1 matches for "5100kb".
Did you mean:
2100kb
2002 Aug 06
1
write.table() adds unnecessary spaces to right align integer column
...padded
with unnecessary spaces (0x20) so that these columns are right align if you
look at them in a text editor. However, I think it is quite a vast of file
size. For instance, I am reading a tab-delimited 4200kb microarray data file
and writing it back verbatim using write.table() and it becomes 5100kb, a
20% increase. Is this problem known and is there anyway to get around it?
Example (R --vanilla):
x <- c(0,1,10,100,1e3,1e5,1e6)
df <- data.frame(a=x, b=as.integer(x), c=as.character(x))
write.table(df, "out.dat")
Output:
"a" "b" "c"
"1"...