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)

