[R] re ferring to a group of vectors without explicit enumeration

shalu shahlar at hotmail.com
Sat Sep 6 23:33:57 CEST 2008


I am trying to define 25 vectors of varying lengths, say y1 to y25 in a loop,
and then store the results of some computations in them. My problem is about
using some sort of concatenation for names. For example, instead of
initializing each of y1 through y25, I would like to do it in a loop.
Similar to cat and paste for texts, is there anyway of using y"i" for the
vector name where i ranges from 1 to 25, so ultimately it refers to the
vector y1,..,y25?
Varying lengths is not a problem. To start with each has only length 1 and
then I will be adding to each vector based on some results.
-- 
View this message in context: http://www.nabble.com/referring-to-a-group-of-vectors-without-explicit-enumeration-tp19351518p19351518.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list