Displaying 1 result from an estimated 1 matches for "boskalis".
Did you mean:
borealis
2011 Apr 22
1
convert string to variable
...a string to a variable?
I have a set of names:
> stocks
[1] "ACCELL" "AHOLD" "AJAX" "ARCADIS" "BALLAST"
"BAM.GROEP"
[7] "BESI" "BETER.BED" "BINCKBANK.NV" "BOSKALIS"
"CATE" "CROWN.V.GELDER"
And a data frame with stockquotes.
With a for-loop I want to create variables (ACCEL, AHOLD ....) with quotes
from the data frame 'data':
for (i in stocks){
k=1; m=2
m=10
??i <- data[,k:m]
k=k+2; m=10+2
}
How can I do this?
Thanks...