Skip to content

Dependency Injection & Inversion of Control for Data

5 messages · William Dunlap, Jeff Newmiller, Bert Gunter +1 more

#
R is a functional language so you might want to google for 'dependency
injection functional language' and see why dependency injection is not
a hot concept in R.

Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Jul 29, 2014 at 9:02 AM, Reed Spool <reed at graphicacy.com> 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:<jdnewmil at 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 <reed at graphicacy.com> wrote:
#
...
and so it is straightforward to have both data and a preprocessing
function as arguments to an analysis function so that the
preprocessing is done both appropriately and efficiently.  Or to pass
both data and preprocessing function as a single construct.

If this misstates the issue, please say so.

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll
On Tue, Jul 29, 2014 at 9:57 AM, William Dunlap <wdunlap at tibco.com> wrote: