[R] Dependency Injection Inversion of Control for Data

2014-07-29 Thread Reed Spool
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

Re: [R] Dependency Injection Inversion of Control for Data

2014-07-29 Thread William Dunlap
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 r...@graphicacy.com wrote: Greetings, New

Re: [R] Dependency Injection Inversion of Control for Data

2014-07-29 Thread Jeff Newmiller
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

Re: [R] Dependency Injection Inversion of Control for Data

2014-07-29 Thread Bert Gunter
... 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

Re: [R] Dependency Injection Inversion of Control for Data

2014-07-29 Thread Reed Spool
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