[R] Printing integers in R "as is"

From: Firas Swidan <firas_at_cs.technion.ac.il>
Date: Thu 14 Apr 2005 - 21:32:33 EST

I am using the following command to print to a file (I omitted the file details):

cat( paste( paste(orientation, start, end, names,"\n"), paste(start, end,
"exon\n"), sep=""))

where "orientation" and "names" are character vectors and "start" and
"end" are integer vectors.

The problem is that R coerce the integer vectors to characters. In general, that works fine, but when one of the integer is 100000 (or has more 0's) then R prints it as 1e+05. This behavior causes a lot of trouble for the program reading R's output. This problem occur with paste, cat,
and print (i.e. paste(100000)="1e+05" and so on).

I tried to change the "digit" option in "options()" but that did not help. Is is possible to change the behavior of the coercing or are there any work arounds?

Thanks in advance,

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Apr 14 21:34:57 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:10 EST