Skip to content
Prev 166347 / 398502 Next

Faster Printing Alternatives to 'cat'

Yoo should have a look at ?write.table

dataset <- cbind(foo, bar, qux)
#write to a file
write.table(x = dataset, file = "your_file_name.txt", sep = "\t",
row.names = FALSE)
#wrfite to the console
write.table(x = dataset, file = "", sep = "\t", row.names = FALSE)

HTH,

Thierry 


------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium 
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be 
www.inbo.be 

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
Namens Gundala Viswanath
Verzonden: donderdag 8 januari 2009 14:27
Aan: jim holtman
CC: r-help at stat.math.ethz.ch
Onderwerp: Re: [R] Faster Printing Alternatives to 'cat'

Dear Jim and Henrik,
I  simply want to print the data out. Surely, this data
will be manipulated (with Excel or other
programming languages) by other people suit to their purpose.

Typically the print out from the loop looks  like this:

ATCGATCGATCGGGGGGGGGGGGGGGTTTGCGGG   10   11.992
CCCCCCCCGGGCCATCGGTCAGGGAATTGACGGAA   2      0.222
.....
up to ~16 million lines.
6GB
Don't quite understand what do you mean by that
So sorry for my lack of knowledge in R.
Never thought about that. Can you be specific how can this be achieved?

- Gundala Viswanath
Jakarta - Indonesia
On Thu, Jan 8, 2009 at 10:10 PM, jim holtman <jholtman at gmail.com> wrote:
wrote:
http://www.R-project.org/posting-guide.html
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.