[BioC] Using aggregators

Martin Morgan mtmorgan at fhcrc.org
Wed Oct 25 00:41:28 CEST 2006


Hi Richard --

Not really a pro on using aggregator, but I'm guessing that what you'd
like to do is

agg <- new("aggregator", aggenv=new.env(parent=emptyenv()))

'aggenv' is where the aggregated data gets stored. It's a data
structure called an 'environment'. What the line above does is create
a new environment each time you create a 'new' aggregator.

Hope this helps.

Martin

"Craddock, Richard C. (CDC/CCID/NCZVED) (CTR)" <cmi5 at cdc.gov> writes:

> Hello all,
>
> I am having an issue with using an aggregator.  My goal is to perform
> cross validation on several different datasets.  I would like to use an
> aggregator to keep track of the results from a single dataset, but not
> across datasets.  
>
> Here is the code that I have written:
>
> for(i in 1:niters)
> {
>     agg<-new("aggregator")
>     fs<-fsCV( data[,i], gfun, class[,i], agg)
>     rm( agg )
> }
>
> The problem is that every time I run the line agg<-new("aggregator") it
> returns the old aggregator.  So I end up aggregating the results across
> datasets, which I do not want to do.  
>
> What am I missing here?  Is there a function for clearing the
> aggregator?  I haven't been able to find one.
>
> Thanks,
> Cameron
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Martin T. Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the Bioconductor mailing list