syntax. Extending objects dynamically like this is probably the
surest way to run out of memory. If you know the final length an
object will be, then it is best to create the object at its full length
and then subscript into it with assignments.
In this application you apparently don't know what the final length will be. In this case you can create an object of some length, subscript into it with assignments (keeping track of how much has gone in), then grow the object again by some chunk when more room is needed.
Patrick Burns
Burns Statistics [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User")
Mark O. Kimball wrote:
I believe this should be an easy thing to do...
I have a function I repeatably call which takes input parameters and outputs columns to various data frames. I also wish to keep a summary of certain values as I call the function. I though keeping the values in a vector then appending the vector by the new amounts would be the way to do this.
Example: (this is what I want even thought the below syntax is wrong)
a <- 1 print(a) --> 1
a <- c(a,2) print(a) --> 1,2
a <- c(a,2,4,5) print(a) --> 1,2,2,4,5
Any help would be greatly appreciated...
Marko
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
