

putC(wavethresh)                             R Documentation

_P_u_t _S_m_o_o_t_h_e_d _D_a_t_a _I_n_t_o _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_:

     Makes a copy of the wd object, replaces some smoothed
     data in the copy, and then returns it.

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

     putC(wd, level, v, boundary=FALSE)

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

      wd: object of class `wd' that is to be copied and have
          smoothed data replaced.

   level: integer; the level at which the replacement is to
          take place.

       v: the replacement data which should be of the cor-
          rect length.

boundary: logical; if `FALSE' then only the "real" data is
          replaced (and it is easy to predict the required
          length of `v').

          If boundary is `TRUE', you can replace the bound-
          ary values at a particular level as well (but it
          is hard to predict the required length of `v', and
          the information has to be obtained from the
          `first.last' database component of `wd').

          `boundary' has no meaning if `wd' was obtained
          with the periodic boundary handling method (`bc').

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

     The function `accessC' obtains the smoothed data for a
     particular level. This function, `putC' replaces data
     at a particular level and returns a modified wd object
     reflecting the change.

     This function is probably not particularly useful, but
     it is present for completeness.  It is required because
     of the pyramidal nature of the smoothed data points
     being packed into a vector.

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

     A `wd' class object containing the replaced data, see
     `wd.object'.

_R_E_L_E_A_S_E_:

     Release 2.2 Copyright Guy Nason 1993

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

     `wd.object', `accessC'

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

     example(wd)
     ## Put the numbers 1:64 into level 6
     summary(newds <- putC(wds, level=6, v=1:64, boundary=FALSE))
     #
     # If you look at the C component of new, you will see that
     # some numbers have changed at the appropriate position.
     all.equal(wds,newds)
     ##>[1] "Component C: ... difference: 2.1912"

