[R] First attempt to use R
Ted
r.ted.byers at gmail.com
Thu Jul 3 23:09:49 CEST 2008
While I am not a novice when it comes to statistics, this will be the first
time I have used R, apart from some intial play. I have normally written my
own code for statistical analysis in C++ or fortran, for a number of reasons
(in part contingent on what the boss was willing to pay for), and having been
programming for a long time, there is no need to spare me the programming
details. Just give me an url for a document that explains how to do what I
want to do, if there is one.
What I want to do is extract time series data from a database(say, PostgreSQL
or MySQL - I routinely use both), analyse it, and put a selection of the
statistical results into specific tables.
For example, suppose I have daily values for several variates. One thing I
might try is to fit a cubic spline to the data, use the spline to obtain an
estimate of rate of change and acceleration, and then see if some nonlinear
function of the variates can account for a significant percentage of the
variation in rate of change and acceleration, perhaps after orthogonalization
if there happens to be problems with multicollinearity.
Since the data comes in regularly (daily in some cases, weekly in others), I'd
want to rerun the whole process at the same interval, without prior analyses
messing up a current analysis.
I know of plr, for PostgreSQL, but haven't figured out how to use it yet.
Is this something I can orchestrate using Perl to tie things together, either
using plr or not? If I can use perl for this, a sample perl script showing
how to use perl to get data into R and to retrieve statistical output from R
into Perl variables would be priceless. What I have read in the preliminary
documentation suggests I can, but it is short on detail and directions on
where to go next. I'd like to be able to put the master script for this sort
of thing into a scheduled task if possible.
Thanks
Ted
More information about the R-help
mailing list