[R] While loop history
jrkrideau at inbox.com
Sun Apr 7 13:43:00 CEST 2013
Loops are seldom a good solution in R so some more information and data would be useful
At the simplist, for your specific question I think you could set up two vectors (e.g. v1 <- rep(NA, 10 ) and just write the values into the vectors as you proceed through the loop.
Kingston ON Canada
> -----Original Message-----
> From: bayywater at gmail.com
> Sent: Sun, 7 Apr 2013 14:36:33 +1200
> To: r-help at r-project.org
> Subject: [R] While loop history
> I am new at R and still trying to get the hang of things.
> I am running a while loop and wish to save the results of each iteration.
> The results are a vector x of length two and I wish to save the results
> each iteration as two vectors, one for x and the other for x.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails
More information about the R-help