[R] Accessing variables inside a namespace

Santosh Srinivas
2010-11-18T01:12:02Z

Hello Group,

I am trying to see if there is way to access data that is inside another
namespace.
For e.g. the addATR function in the quantmod package calculates the ATR
using the TTR package and then plots it to the graph.

Now since it has already calculated the info that I need, can I access that
data which if I look at the function code is stored in a variable called
"atr"


library(TTR)
library(quantmod)
data(ttrc)
x <-
subset(ttrc,select=c("Date","Open","High","Low","Close"))
x.z <- read.zoo(x)
x.xts <- as.xts(x.z)
chartSeries(x.xts)
addATR()


Just so that I don't need to recalculate the same stuff again. I believe the
data hasn't "expired" already.

Thanks for your help.
S