I have a list of variables of a variable length (e.g., Var1, Var2, Var3,
... Vark). What I want to do is somehow feed that information into the
paste function, like:

paste(Var1, Var2, Var3...)

The problem is that I don't want to hard-code it because it's wrapped
within a function. Is there a way to supply a string? e.g.,

k = 2
VarNames = paste0("Var", 1:k)
paste(someFunction(VarNames), collapse="")

Suppose Var1 = A, B, C and Var2 = 1, 2. The result should return A1, A2,
B1, B2, C1, C2.

I've tried using eval, and get, but with no luck. Thanks in advance!

Dustin

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to