[R] should I use setRefClass() ?

2011-04-24 Thread Ben Nachtrieb
Hello,

I am somewhat new to R programming and a novice C++ programmer.

I'd like to know if I should use setRefClass() to manage objects, functions,
and data in a very large program I am attempting to code.
See:
http://stat.ethz.ch/R-manual/R-devel/library/methods/html/refClass.html

I like the referential class structure that C++ provides and R seems to
provides via setRefClass(). Mainly what I like is that I can code custom
member functions that 'do stuff' inside a class.

I understand that setRefClass() kind of gets away from the way R was
intended to be used. It is this 'understanding' that makes me worry about
using something setRefClass(). The program that I am attempting to build is
very big, complex (for me), and it needs to be efficient (from a code
readability standpoint and from a speed standpoint). I will be using a lot
of the built-in R stats-centric functions. Are there any pitfalls I should
be aware of? Any insight or suggestions? I was thinking the setRefClass()
function would provide what I like in C++, but allow me to do everything in
R (rather than having C++ and R interface with each other).

Thanks for any help!

Ben

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Seasonality - Centered MA vs. Holt-Winters

2010-06-28 Thread Ben Nachtrieb
Hello,

I asked this question on the r-finance list server and didn't get a reply.
Thought I would try here to.

I am trying to deseasonalize some financial time series data and I wanted
some feedback on the best methods for doing this. I found two Centered
Moving Average and Holt-Winters. Which is better and/or more appropriate for
financial time series data in your opinion?

I understand that Holt-Winters is a type of exponential smoothing and I have
a complete description of how to calculate Centered Moving Averages
(seasonal indices), but no discussion on which is more appropriate for
certain situations.

Any information on either (or other methods that you feel are better) would
be great!

Thanks!

-- 
Ben Nachtrieb
M.S.F. Investments, University of Denver
Beta Gamma Sigma member

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.