

accessC(wavethresh)                          R Documentation

_G_e_t _S_m_o_o_t_h_e_d _D_a_t_a _f_r_o_m _W_a_v_e_l_e_t _S_t_r_u_c_t_u_r_e

_D_e_s_c_r_i_p_t_i_o_n_:

     The smoothed and original data from a wavelet decompo-
     sition structure (returned from `wd') are packed into a
     single vector in that structure.  This function
     extracts the data corresponding to a particular resolu-
     tion level.

_U_s_a_g_e_:

     accessC(wd.obj, level = wd.obj$nlevels, boundary=FALSE)

_A_r_g_u_m_e_n_t_s_:

  wd.obj: wavelet decomposition structure from which you
          wish to extract the smoothed or original data if
          the structure is from a wavelet decomposition, or
          the reconstructed data if the structure is from a
          wavelet reconstruction.

   level: the level that you wish to extract.  By default,
          this is the level with most detail (in the case of
          structures from a decomposition this is the origi-
          nal data, in the case of structures from a recon-
          struction this is the top-level reconstruction).

boundary: logical; if `TRUE' then all of the boundary cor-
          rection values will be returned as well (note: the
          length of the returned vector may not be a power
          of 2).
          If `boundary' is false, then just the coefficients
          will be returned.

          If the decomposition (or reconstruction) was done
          with periodic boundary conditions, this option has
          no effect.

_D_e_t_a_i_l_s_:

     The wd (wr) function produces a wavelet decomposition
     (reconstruction) structure.

     For decomposition, the top level contains the original
     data, and subsequent lower levels contain the succes-
     sively smoothed data.  So if there are 2^m original
     data points, there will be m+1 levels indexed
     0,1,...{},m. So

     > accessC(wd.obj, level=m)

     pulls out the original data, as does

     > accessC(wd.obj)

     To get hold of lower levels just specify the level that
     you're interested in, e.g.

     > accessC(wd.obj, level=2)

     gets hold of the second level.

     For reconstruction, the top level contains the ultimate
     step in the Mallat pyramid reconstruction algorithm,
     lower levels are intermediate steps.

     The need for this function is a consequence of the
     pyramidal structure of Mallat's algorithm and the mem-
     ory efficiency gain achieved by storing the pyramid as
     a linear vector. AccessC obtains information about
     where the smoothed data appears from the fl.dbase com-
     ponent of wd.obj, in particular the array
     `fl.dbase$first.last.c' which gives a complete specifi-
     cation of index numbers and offsets for `wd.obj$C'.

     Note that this and the `accessD' function only work
     with objects of class `wd', see `wd.object'.

     Further note that this function only gets information
     from 'wd' class objects. To put coefficients etc. into
     `wd' structures you have to use the "putC" function.

_V_a_l_u_e_:

     A vector of the extracted data.

_S_e_e _A_l_s_o_:

     For background information, `wr' and `wd'.  Further,
     `accessD', `filter.select', `plot.wd', `threshold',
     `putC', `putD'.

_E_x_a_m_p_l_e_s_:

     ## Get the 3rd level of smoothed data from a decomposition
     accessC(wd(rnorm(2^7)), level=3)

     example(wd)
     str(accessC(wds))
     ## Plot the time series from a reconstruction
     plot.ts(accessC(wr(wds, return.obj = TRUE)))

