[R] Dependency Injection & Inversion of Control for Data

Bert Gunter gunter.berton at gene.com
Tue Jul 29 19:45:32 CEST 2014


...
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:
> 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:
>> 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 at 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-help at 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.



More information about the R-help mailing list