parse_Rd                package:tools                R Documentation

_P_a_r_s_e _a_n _R_d _f_i_l_e

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

     This function reads an R documentation (Rd) file and parses it,
     for processing by other functions.

     It is *experimental*.

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

     parse_Rd(file, srcfile = NULL, encoding = "unknown", verbose = FALSE)

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

    file: A filename or text-mode connection.  At present filenames
          work best.

 srcfile: 'NULL', or a '"srcfile"' object.  See the 'Details' section.

encoding: Encoding to be assumed for input strings.

 verbose: Logical indicating whether detailed parsing information
          should be printed.

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

     This experimental function parses Rd files according to the
     specification given in <URL:
     http://developer.r-project.org/parseRd.pdf>.  At the current
     writing, this is not identical to the rules used by other tools: 
     it is somewhat stricter.

_V_a_l_u_e:

     An object of class '"Rd"'.  The internal format of this object is 
     subject to change.

     At present files which are marked as Latin-1 or UTF-8 or where
     'encoding' has one of those values result in text marked in the
     encoding. In a non-UTF-8 MBCS locale the result will be marked as
     UTF-8.  In all other cases files are assumed to be in the native
     encoding.

_W_a_r_n_i_n_g:

     These functions are still experimental.  Names, interfaces and
     values might change in future versions.

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

     Duncan Murdoch

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

     <URL: http://developer.r-project.org/parseRd.pdf>

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

     'Rd2HTML'.

     'Rd_parse', the function used for parsing  Rd files by 'R CMD
     check'.

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

     baseRd <- Rd_db("base")
     con <- textConnection(baseRd[[1]], "rt")
     parse_Rd(con)
     close(con)

