exprs-methods              package:xps              R Documentation

_G_e_t/_S_e_t _E_x_p_r_e_s_s_i_o_n _V_a_l_u_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Get/set expression values from/for class 'ExprTreeSet'.

     _Usage_

     'exprs(object)' 
      'exprs(object, treenames = NULL) <- value'

_A_r_g_u_m_e_n_t_s:

  object: object of class 'ExprTreeSet'.

treenames: 'character' vector containing optional tree names to be used
          as subset.

   value: 'data.frame' containing expression values.

_D_e_t_a_i_l_s:

     Get the expression values from slot 'data' or set slot 'data' to
     'value'.

     Method 'exprs' returns the expression values from slot 'data' as
     'data.frame', while replacement method 'exprs<-' allows to replace
     slot 'data' with a 'data.frame'.

     In order to create an 'ExprTreeSet' containing only a subset of
     slot 'data', first export slot 'data' using method 'exprs', create
     a 'character' vector containing only 'treenames' to be used in the
     subset, and then use replacement method 'exprs<-' to replace slot
     'data' with the subset. Slots 'treenames' and 'numtrees' will be
     updated automatically.

     Note: When creating 'character' vector 'treenames' it is
     sufficient to use the name part of the tree name w/o the
     extension.

     Note: If you do not want to replace your current object, create
     first a copy of type 'ExprTreeSet' by simply writing 'newobj <-
     oldobj', and use 'newobj' for replacement. This is important since
     'exprs<-' does also update slots 'treenames' and 'numtrees' as
     already mentioned.

_A_u_t_h_o_r(_s):

     Christian Stratowa

_S_e_e _A_l_s_o:

     'pvalData', 'presCall'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     ## load ROOT scheme file and ROOT data file
     scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
     data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

     ## create an ExprTreeSet
     data.rma <- rma(data.test3,"tmp_TestRMA",tmpdir="",background="pmonly",normalize=TRUE,verbose=FALSE)

     ## get expression values
     value <- exprs(data.rma)

     ## selected treenames only
     treenames <- c("TestA2", "TestB1")

     ## make a copy of your object if you do not want to replace it
     subset.rma <- data.rma

     ## replace slot data with subset
     exprs(subset.rma, treenames) <- value
     str(subset.rma)
     ## End(Not run)

