putpacket.wst           package:wavethresh           R Documentation

_P_u_t _a _p_a_c_k_e_t _o_f _c_o_e_f_f_i_c_i_e_n_t_s _i_n_t_o _a _p_a_c_k_e_t _o_r_d_e_r_e_d _n_o_n-_d_e_c_i_m_a_t_e_d _w_a_v_e_l_e_t _o_b_j_e_c_t (_w_s_t).

_D_e_s_c_r_i_p_t_i_o_n:

     This function inserts a packet of coefficients into a
     packet-ordered non-decimated wavelet object ('wst') object. The
     'wst' objects are computed by the 'wst' function amongst others.

_U_s_a_g_e:

     putpacket.wst(wst, level, index, packet, ...)

_A_r_g_u_m_e_n_t_s:

     wst: Packet-ordered non-decimated wavelet object into which you
          wish to insert the packet.

   level: The resolution level of the coefficients that you wish to
          insert.

   index: The index number within the resolution level of the packet of
          coefficients that you wish to insert.

  packet: A vector of coefficients that you wish to insert into the
          'wst' object. The length that the packet has to may be
          determined by extracting the same packet of coefficients
          using the 'getpacket.wst' function and using the S-Plus
          length function to determine the length!

     ...: any other arguments

_D_e_t_a_i_l_s:

     This function actually calls the 'putpacket.wp' to do the
     insertion.

     In the future this function will be extended to insert father
     wavelet coefficients as well.

_V_a_l_u_e:

     An object of class 'wst.object' containing the packet ordered
     non-decimated wavelet coefficients that have been modified: i.e.
     with packet inserted.

_R_E_L_E_A_S_E:

     Version 3.9 Copyright Guy Nason 1998

_S_e_e _A_l_s_o:

     'getpacket.wst', 'putpacket', 'putpacket.wp', 'wst', 'wst.object'.

_E_x_a_m_p_l_e_s:

     #
     # Take the packet-ordered non-decimated transform of some random data 
     #
     #MyWST <- wst(rnorm(1:512))
     #
     # The above data set was 2^9 in length. Therefore there are
     # coefficients at resolution levels 0, 1, 2, ..., and 8.
     #
     # The high resolution coefficients are at level 8.
     # There should be 256 coefficients at level 8 in index location 0 and 1.
     #
     #length(getpacket(MyWST, level=8, index=0))
     # [1] 256
     #length(getpacket(MyWST, level=8, index=1))
     # [1] 256
     #
     # There should be 4 coefficients at resolution level 2
     #
     #getpacket(MyWST, level=2, index=0)
     # [1] -0.92103095  0.70125471  0.07361174 -0.43467375
     #
     # O.k. Let's insert the packet containing the numbers 19,42,21,32
     #
     #NewMyWST <- putpacket(MyWST, level=2, index=0, packet=c(19,42,31,32))
     #
     # Let's check that it put the numbers in correctly by reaccessing that
     # packet...
     #
     #getpacket(NewMyWST, level=2, index=0)
     # [1] 19 42 31 32
     #
     # Yep. It inserted the packet correctly.

