[R] Extending a vector

Mark O. Kimball mok2 at physics.buffalo.edu
Fri Apr 2 23:27:15 CEST 2004


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
-- 
Mark O. Kimball
Gasparinilab, University of Buffalo  |  Low temp physics
mok2 at physics.buffalo.edu  |  URL: enthalpy.physics.buffalo.edu
lab phone: 716-645-2017x122  Fax: 716-645-2507




More information about the R-help mailing list