Displaying 1 result from an estimated 1 matches for "assetsnam".
Did you mean:
assetsnames
2009 Jul 10
3
strange strsplit gsub problem 0 is this a bug or a string length limitation?
...A71+A72+A73+A74+A75+A76+A77+A78+A79+A80+A81+A82+A83+A84+A85+A86+A87+A88+A89+A90+A91+A92+A93+A94+A95+A96+A97+A98+A99+A100+A101+A102+A103+A104+A105+A106+A107+A108+A109+A110+A111+A112+A113
benchmarkName = as.character(backtestFormula)[2]
print(as.character(backtestFormula)[3])
print(benchmarkName)
assetsNames <- strsplit(gsub(" ", "", as.character(backtestFormula)[3]),
"\\+")[[1]]
nAssets = length(assetsNames)
print(nAssets)
list(assetsNames)
===============output:
> backtestFormula<-SPX~A1+A2+A3+A4+A5+A6+A7+A8+A9+A10+A11+A12+A13+A14+A15+A16+A17+A18+A19+A2...