[R] How to pass an object between two independant environment?

2013-10-02 Thread Frederic Fournier
Hello everyone, I am trying to pass an object cleanly between two independant environments, any ideas on how to do that? I have something like this: calling.function - function(my.object) { ... ... local(source(function_to_which_I_want_to_pass_my_object.Rda, local = new.env(parent =

[R] Parsing very large xml datafiles with SAX: How to profile anonymous functions?

2012-10-26 Thread Frederic Fournier
Hello everyone, I'm trying to parse a very large XML file using SAX with the XML package (i.e., mainly the xmlEventParsing function). This function takes as an argument a list of other functions (handlers) that will be called to handle particular xml nodes. If when I use Rprof(), all the handler

[R] Parsing very large xml datafiles with SAX (XML package): What data structure should I favor?

2012-10-26 Thread Frederic Fournier
Hello again, I have another question related to parsing a very large xml file with SAX: what kind of data structure should I favor? Unlike using DOM function that can return lists of relevant nodes and let me use various versions of 'apply', the SAX parsing returns me one thing at a time. I

[R] Parsing large XML documents in R - how to optimize the speed?

2012-08-10 Thread Frederic Fournier
Hello everyone, I would like to parse very large xml files from MS/MS experiments and create R objects from their content. (By very large, I mean going up to 5-10Gb, although I am using a 'small' 40M file to test my code.) My first attempt at parsing the 40M file, using the XML package, took