[R] Managing output
Noah Silverman
noah at smartmediacorp.com
Wed Aug 26 21:20:11 CEST 2009
Hi,
Is there a way to build up a vector, item by item. In perl, we can
"push" an item onto an array. How can we can do this in R?
I have a loop that generates values as it goes. I want to end up with a
vector of all the loop results.
In perl it woud be:
for(item in list){
result <- 2*item^2 (Or whatever formula, this is just a pseudo example)
Push(@result_list, result) (This is the step I can't do in R)
}
Thanks!
More information about the R-help
mailing list