Skip to content

Converting data for use in TTR and PerformanceAnalytics

4 messages · Kenneth Rose, Brian G. Peterson, Joshua Ulrich

#
On Mon, Jun 13, 2011 at 8:55 AM, Kenneth Rose <kennethrose82 at gmail.com> wrote:
It's not possible that you get this error from running the code in the
blog post you cite because it does not use the "@" operator.
The blog post you cite doesn't use "@" to access columns, so why are
you using it?  I strongly suggest you read the manuals rather than try
random code.  It's also useful to cross-reference the "See Also"
section of the manual pages.  For example, you could have looked at:

R> help("@")  # The @ operator
R> help("data.frame")  # data.frames (See Also: [.data.frame? for
subsetting methods)
R> help("S4")  # S4 objects

It would also be helpful to read "An Introduction to R".
Specifically, the section on lists and data.frames:
http://cran.r-project.org/doc/manuals/R-intro.html#Lists-and-data-frames
Best,
--
Joshua Ulrich  |  FOSS Trading: www.fosstrading.com
#
Hi Joshua and Brian

Thank you for your replies. It was the "@" that messed things up. I
really don't know why I used the "@" instead of the "$". I think I'm
gonna work through some more examples before I start writing my own
"random code" :)

Thanks,

Kenneth
On Mon, Jun 13, 2011 at 4:20 PM, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote: