[Bioc-sig-seq] Update only specific spaces of RangedData

Patrick Aboyoun paboyoun at fhcrc.org
Fri Sep 25 10:40:57 CEST 2009


Christian,
Thanks for bringing this issue up. I have been meaning to improve the 
subscript replacement functions in IRanges for some time and this gives 
me a reason to make some improvements now. I need to put some testing 
infrastructure in place to ensure the software is behaving as expected, 
but the current solution I am working on for your problem would look like

values(x)[[i]][[j]] <- value    # set the jth column in the ith space

As this operation shows, I am working on the values table of the 
RangedData object and not the whole object. This will complement the 
current method of selecting the jth column in the ith space

values(x)[[i]][[j]]    # get the jth column in the ith space

I'll let you know when this enhancement has been check-in.


Patrick



Christian Ruckert wrote:
> I am missing a method to update only specific spaces of a RangedData 
> object.
>
> Let 'x' be a 'RangedData' object.
>
> The two existing methods are:
>
> 'x[i]': Subsets 'x' by indexing into its spaces, so the result is
>           of the same class, with a different set of spaces.
>
> 'x[[j]] <- value': Sets value as column 'j' in 'x', where 'j' can
>           be a character, numeric, or logical scalar that indexes into
>           the columns. The length of 'value' should equal 'nrow(x)'.
>
> I am looking for a mixture of both, something like:
>
> x[i][[j]] <- value
>
> which actually doesn't work this way.
>
> Any help would be appreciated,
> Christian
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing



More information about the Bioc-sig-sequencing mailing list