codeChunk-class            package:DynDoc            R Documentation

_C_l_a_s_s "_c_o_d_e_C_h_u_n_k"

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

     A class to wrap necessary information for a code chunk from a
     vignette file.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("codeChunk",
     ...)'.

_S_l_o_t_s:

     '_c_h_u_n_k_N_a_m_e': Object of class '"character"' The name (if one
          exists) for the code chunk

     '_c_h_u_n_k': Object of class '"character"' The code from the code
          chunk

     '_o_p_t_i_o_n_s': Object of class '"SweaveOptions"' Any options that were
          set at the time the code chunk appears in the vignette file

_M_e_t_h_o_d_s:

     _e_v_a_l_C_h_u_n_k 'signature(object = "codeChunk", env="environment")':
          Will evaluate the code in the code chunk using the
          environment specified.  If no environment is specified,
          .GlobalEnv is used.

     _s_h_o_w 'signature(object = "codeChunk")': Displays the information
          for the code chunk

     _c_h_u_n_k<- 'signature(object = "codeChunk", value="character")':
          Edits the 'chunk' slot of the object

     _c_h_u_n_k 'signature(object = "codeChunk")': Returns the 'chunk' slot
          of the object

     _c_h_u_n_k_N_a_m_e 'signature(object = "codeChunk")': Returns the name of
          the code chunk

     _g_e_t_O_p_t_i_o_n_s 'signature(object = "codeChunk")': Returns the actual
          options from the 'options' slot. 

     _S_w_e_a_v_e_O_p_t_i_o_n_s 'signature(object = "codeChunk")': Returns the
          object stored in the 'options' slot.

_A_u_t_h_o_r(_s):

     Jeff Gentry

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

     'Sweave', 'SweaveOptions', 'chunkList'

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

         require("utils")
         testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package="utils")
         z <- Stangle(testfile,driver=tangleToR)
         getChunk(z,1)

