Thanks for the quick responses everyone,

Bill, good point. In JavaScript I've used RequireJS, which is the type of
thing I'm interested in. I don't need anything strongly typed.

Excuse my ignorance, but R is not "totally functional", and it is object
oriented, right? I.e. it is functional in that it has first-class
functions, but not functional in that there are no side effects. I see your
point: IoC is an OOP concept. In functional terms, partial application of
functions is the closest thing to IoC. Are we on the same page there, Bill?

Jeff, Bert, that is exactly the system we have now. Problems arise because
there are actually many analyses being composed into one report (on a pdf).
Many of the procedures use the same source data (that changes from time to
time). Splitting the different analyses into different files for a breath
of fresh air has caused some spaghetti/global-splosions.


On Tue, Jul 29, 2014 at 1:10 PM, Jeff Newmiller <jdnew...@dcn.davis.ca.us>
wrote:

> Color me mystified. In particular, "preprocessing at the time of
> analysis"... what is wrong with writing a function that gets your data and
> cleans it up, then calling it when you feel the time is right?
>
> Note that R is optimized for vector processing (columns), not row-by-row
> processing, so the sooner you embrace this paradigm will be the sooner you
> will be productive with it. Where your data do not match this structure the
> most effective strategy is to transform it to that structure, perhaps using
> Rcpp or an external tool.
> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<jdnew...@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
> Go...
>                                       Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> On July 29, 2014 9:02:31 AM PDT, Reed Spool <r...@graphicacy.com> wrote:
> >Greetings,
> >
> >New to R, coming from Java (Spring).
> >
> >We have many different data sources (CSV's) for our analysis. Some of
> >them
> >need preprocessing at the time of analysis - doing it earlier and
> >saving
> >the resultant table doesn't make sense.
> >
> >My code is getting tangled quickly as I try to read.csv my many data
> >files
> >and source both the preprocessing stuff as well as my analysis code.
> >
> >I'm hoping for a streamlined method of injecting the data/code needed
> >into
> >my analysis code, instead of imperatively sorting everything out at the
> >top
> >of my analysis code.
> >
> >Googling "Dependency Injection R" and "Inversion of Control R" gave
> >nothing
> >useful. Searching for "Dependency Management" brought me to the packrat
> >package, but that doesn't seem to have the injection element I'm
> >looking
> >for (as I would expect from such a system).
> >
> >Am I barking up the wrong tree? I can't imagine my problem is a new
> >one.
> >How do you solve it?
> >
> >Cheers,
> >Reed
> >
> >       [[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.
>
>

        [[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.

Reply via email to