Rdoc                  package:R.oo                  R Documentation

_C_l_a_s_s _f_o_r _c_o_n_v_e_r_t_i_n_g _R_d_o_c _c_o_m_m_e_n_t_s _t_o _R_d _f_i_l_e_s

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

     Package:  R.oo 
      *Class Rdoc*

     'Object'
      '~~|'
      '~~+--''Rdoc'

     *Directly known subclasses:*


     public static class *Rdoc*
      extends Object

     Class for converting Rdoc comments to Rd files.

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

     Rdoc()

_F_i_e_l_d_s _a_n_d _M_e_t_h_o_d_s:

     *Methods:*

         'argsToString'          Gets the arguments signature of a function.
         'check'                 Checks the compiled Rd files.
         'compile'               Compile source code files containing Rdoc comments into Rd files.
         'createManPath'         Creates the directory where the Rd files should be saved.
         'createName'            Creates a class-method name.
         'declaration'           Gets the class declaration.
         'escapeRdFilename'      Escape non-valid characters in a filename.
         'getClassS4Usage'       Gets the usage of a S4 class.
         'getKeywords'           Gets the keywords defined in R with descriptions.
         'getManPath'            Gets the path to the directory where the Rd files will be saved.
         'getNameFormat'         Gets the current name format.
         'getPackageNameOf'      Gets the package of a method or an object.
         'getRdTitle'            Extracts the title string of a Rd file.
         'getUsage'              Gets the usage of a method.
         'hierarchy'             Gets the class hierarchy.
         'isKeyword'             Checks if a word is a Rd keyword.
         'isVisible'             Checks if a member is visible given its modifiers.
         'methodsInheritedFrom'  Gets all methods inherited from a class in Rd format.
         'setManPath'            Sets the path to the directory where the Rd files should be saved.
         'setNameFormat'         Sets the current name format.

     *Methods inherited from Object*:
      $, $<-, [[, [[<-, as.character, attach, attachLocally,
     clearCache, clone, detach, equals, extend, finalize, gc,
     getEnvironment, getFields, getInstanciationTime,
     getStaticInstance, hasField, hashCode, ll, load, objectSize,
     print, save

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

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

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

     R developers, _Guidelines for Rd files_, <URL:
     http://developer.r-project.org/Rds.html>, 2003

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

     ## Not run: # Set default author
     author <- "Henrik Bengtsson, \url{http://www.braju.com/R/}"

     # Show the file containing the Rdoc comments
     rdocFile <- system.file("misc", "ASCII.R", package="R.oo")
     file.show(rdocFile)

     # Compile the Rdoc:s into Rd files (saved in the destPath directory)
     destPath <- tempdir()
     Rdoc$compile(rdocFile, destPath=destPath)

     # List the generated Rd files
     rdFiles <- list.files(destPath, full.names=TRUE)
     print(rdFiles)

     # Show one of the files
     file.show(rdFiles[1])

     # Clean up
     file.remove(rdFiles)
     ## End(Not run)

