Grokbase Groups R r-help March 2002
FAQ
write() for ascii, save() for binary. With write()
you can use append=T for puting all the vectors in the same
file (better as rows).

To recover them to a matrix having used write(...,append=T)
matriz <- matrix(scan("outputfile.txt"),byrow=T,ncol=numcol.in.file)
matriz <- t(matriz) #if the vectors had been written as rows
From save(), use load().
Perhaps you should consider one of the tutorials
in http://cran.r-project.org/other-docs.html

Agus

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es

On Mon, 18 Mar 2002, Francisco J Molina wrote:

I have a script that generates vectors (one in a while) How can I write
them to a file?

How can I recover them and put them in a matrix (or some array where I
can introduce more vectors)?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupr-help @
categoriesr
postedMar 19, '02 at 3:42a
activeMar 19, '02 at 9:48a
posts3
users3
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase