Movatterモバイル変換


[0]ホーム

URL:


rdrr.io

vignette: View, List or Get R Source of Package Vignettes

vignetteR Documentation

View, List or Get R Source of Package Vignettes

Description

View a specified package vignette, or list the available ones;display it rendered in a viewer, and get or edit itsR source file.

Usage

vignette(topic, package = NULL, lib.loc = NULL, all = TRUE)## S3 method for class 'vignette'print(x, ...)## S3 method for class 'vignette'edit(name, ...)

Arguments

topic

a character string giving the (base) name of the vignetteto view. If omitted, all vignettes from all installed packages arelisted.

package

a character vector with the names of packages tosearch through, orNULL in which ‘all’ packages (asdefined by argumentall) are searched.

lib.loc

a character vector of directory names ofR libraries,orNULL. The default value ofNULL corresponds to alllibraries currently known.

all

logical; ifTRUE search all available packages inthe library trees specified bylib.loc, and ifFALSE,search only attached packages.

x, name

object of classvignette.

...

ignored by theprint method, passed on tofile.edit by theedit method.

Details

Functionvignette returns an object of the same class, theprint method opens a viewer for it.

On Unix-alikes,The program specified by thepdfviewer option is used forviewing PDF versions of vignettes.

If several vignettes have PDF/HTML versions with base name identicaltotopic, the first one found is used.

If no topics are given, all available vignettes are listed. Thecorresponding information is returned in an object of class"packageIQR".

See Also

browseVignettes for an HTML-based vignette browser;RShowDoc(<basename>, package = "<pkg>") displays a“rendered” vignette (pdf or html).

Examples

## List vignettes from all *attached* packagesvignette(all = FALSE)## List vignettes from all *installed* packages (can take a long time!):vignette(all = TRUE)## The grid intro vignette -- open it## Not run: vignette("grid") # calling print()## The same (conditional on existence of the vignettte).## Note that 'package = *' is much faster in the case of many installed packages:if(!is.null(v1 <- vignette("grid", package="grid"))) {## Not run: v1 # calling print(.)  str(v1)  ## Now let us have a closer look at the code        ## Not run: edit(v1) # e.g., to send lines ...}# if( has vignette "installed")## A package can have more than one vignette (package grid has several):vignette(package = "grid")if(interactive()) {   ## vignette("rotated")   ## The same, but without searching for it:   vignette("rotated", package = "grid")}

What can we improve?

R Package Documentation

Browse R Packages

We want your feedback!

Note that we can't provide technical support on individual packages. You should contact the package authors for that.

 
Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, readEmbedding Snippets.

Close

[8]ページ先頭

©2009-2025 Movatter.jp