Not at all -- I can obfuscate much better.


[EMAIL PROTECTED] wrote:


Goodness Patrick, this must surely qualify for the obfuscated R competition finals. I love it!



[snip]


A more serious, philosophical word on Patrick's solution. It is rarely necessary (in my limited experience, sure) to have to use parse() like this. Where it provides a quick (kludgy?) solution I often find it a useful exercise to consider alternatives. They often come out simpler and you nearly always pick up something useful in the process.


Bill V.




[snip]


I think you are looking for the eval-parse-text idiom:


eval(parse(text=paste("cbind(", paste(my.names, collapse=", "), ")")))

Patrick Burns



[snip]



Hello list,
I have two vectors x and x2:

x=runif(10)
x2=runif(10)

and one vectors with their names :

my.names=c("x","x2")

I would like to cbind these two vectors using their names contained


in the


vector my.names.


[snip]

______________________________________________
[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

Reply via email to