vignette                package:utils                R Documentation

_V_i_e_w _o_r _L_i_s_t _V_i_g_n_e_t_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     View a specified vignette, or list the available ones.

_U_s_a_g_e:

     vignette(topic, package = NULL, lib.loc = NULL)

     ## S3 method for class 'vignette':
     print(x, ...)
     ## S3 method for class 'vignette':
     edit(name, ...)

_A_r_g_u_m_e_n_t_s:

   topic: a character string giving the (base) name of the vignette to
          view. If omitted, all available vignettes are listed.

 package: a character vector with the names of packages to search
          through, or 'NULL' in which case _all_ available packages in
          the library trees specified by 'lib.loc' are searched.

 lib.loc: a character vector of directory names of R libraries, or
          'NULL'.  The default value of 'NULL' corresponds to all
          libraries currently known.

 x, name: Object of class 'vignette'.

     ...: Ignored by the 'print' method, passed on to 'file.edit' by
          the 'edit' method.

_D_e_t_a_i_l_s:

     Function 'vignette' returns an object of the same class, the print
     method opens a viewer for it. Currently, only PDF versions of
     vignettes can be viewed. The program specified by the 'pdfviewer'
     option is used for this. If several vignettes have PDF versions
     with base name identical to 'topic', the first one found is used.
     The 'edit' method extracts the R code from the vignette to a
     temporary file and opens the file in an editor.

     If no topics are given, the available vignettes are listed.  The
     corresponding information is returned in an object of class
     '"packageIQR"'.  The structure of this class is experimental.

_E_x_a_m_p_l_e_s:

     ## List vignettes in all attached packages
     vignette()

     ## Not run: 
     ## Open the grid intro vignette
     vignette("grid")

     ## The same
     v1 <- vignette("grid")
     print(v1)

     ## Now let us have a closer look at the code
     edit(v1)

     ## A package can have more than one vignette (package grid has several):
     vignette(package="grid")
     vignette("rotated")
     ## The same, but without searching for it:
     vignette("rotated", package="grid")
     ## End(Not run)

