SweaveSyntConv             package:tools             R Documentation

_C_o_n_v_e_r_t _S_w_e_a_v_e _S_y_n_t_a_x

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

     This function converts the syntax of files in `Sweave' format to
     another Sweave syntax definition.

_U_s_a_g_e:

     SweaveSyntConv(file, syntax, output=NULL)

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

    file: Name of Sweave source file.

  syntax: An object of class `SweaveSyntax' or a character string with
          its name giving the target syntax to which the file is
          converted.

  output: Name of output file, default is to remove the extension from
          the input file and to add the default extension of the target
          syntax. Any directory names in `file' are also removed such
          that the output is created in the current working directory.

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

     Friedrich Leisch

_R_e_f_e_r_e_n_c_e_s:

     Friedrich Leisch: Sweave User Manual, 2002
     <URL: http://www.ci.tuwien.ac.at/~leisch/Sweave>

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

     `RweaveLatex', `Rtangle'

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

     testfile <- file.path(.path.package("tools"),
                           "Sweave", "Sweave-test-1.Rnw")

     ## convert the file to latex syntax
     SweaveSyntConv(testfile, SweaveSyntaxLatex)

     ## and run it through Sweave
     Sweave("Sweave-test-1.Stex")

