Skip to content
Prev 5793 / 15274 Next

Most common way to add derived columns to an XTS object?

It seems the missing piece in the puzzle was to define the column first with

SD$STDDEV = rep(0, NROW(SD))
for (i in 1:NROW(SD)) {
SD[i, "STDDEV"] = SD[i, "StdDev Log Change"] * Cl(AAPL)[i];
}

then I can expect to assign values to it.
On Mar 10, 2010, at 8:12 AM, Joshua Ulrich wrote: