[R] Printing integers in R as is

2005-04-14 Thread Firas Swidan
Hi, 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

Re: [R] Printing integers in R as is

2005-04-14 Thread Jan T. Kim
On Thu, Apr 14, 2005 at 02:32:33PM +0300, Firas Swidan wrote: 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

Re: [R] Printing integers in R as is

2005-04-14 Thread Prof Brian Ripley
Well, you have to convert an integer to character to see it: `as is' is in your case 64 0's and 1's. I very much suspect that you have a double and not an integer: 10 [1] 1e+05 as.integer(10) [1] 10 so that is one answer: actually use an `integer vector' as you claim. A second answer

Re: [R] Printing integers in R as is

2005-04-14 Thread Firas Swidan
Hi, thanks for the suggestions. However, for some reason the first one did not work. Trying cat( paste( paste(orientation, as.integer(start), as.integer(end), names,\n), paste(as.integer(start), as.integer(end),exon\n), sep=)) resulted in the same problem. Setting scipen in options did the

Re: [R] Printing integers in R as is

2005-04-14 Thread Prof Brian Ripley
On Thu, 14 Apr 2005, Firas Swidan wrote: Hi, thanks for the suggestions. However, for some reason the first one did not work. Trying cat( paste( paste(orientation, as.integer(start), as.integer(end), names,\n), paste(as.integer(start), as.integer(end),exon\n), sep=)) resulted in the same problem.