Re: [R] Appending results via for loop

2010-02-05 Thread jim holtman
, Michael > Cc: r-help@r-project.org > Subject: Re: [R] Appending results via for loop > > use a list: > > result <- list() > > for (i in 1:limit){ >    computation >    # store results >    result[[i]] <- yourData > } > > On Fri, Feb 5, 2010 at

Re: [R] Appending results via for loop

2010-02-05 Thread Turchin, Michael
doing this? Thanks, ~Michael From: jim holtman [jholt...@gmail.com] Sent: Friday, February 05, 2010 12:02 PM To: Turchin, Michael Cc: r-help@r-project.org Subject: Re: [R] Appending results via for loop use a list: result <- list() for (i in 1:li

Re: [R] Appending results via for loop

2010-02-05 Thread jim holtman
use a list: result <- list() for (i in 1:limit){ computation # store results result[[i]] <- yourData } On Fri, Feb 5, 2010 at 11:14 AM, Turchin, Michael wrote: > Hey all, > > So I'm manually conducting a sliding window test, and I would like to tack on > results to some var

[R] Appending results via for loop

2010-02-05 Thread Turchin, Michael
Hey all, So I'm manually conducting a sliding window test, and I would like to tack on results to some variable as the results are outputted. I'm using a for loop, and I am currently using an array as my 'output collector' variable, though I know I should be using a dataframe of some sort. My q