rddocs {Rdatasets}R Documentation

Open Dataset Documentation

Description

Opens the documentation for a dataset from Rdatasets as an HTML page using getOption("viewer") or the Rstudio viewer.

Usage

rddocs(dataset, package = NULL)

Arguments

dataset

String. Name of the dataset to download from the Rdatasets archive. Use rdsearch() to search available datasets.

package

String. Package name that originally published the data. If NULL, the function will attempt to automatically detect the package by searching for an exact match in the Rdatasets index.

Details

The function attempts to open the documentation in the following order:

  1. RStudio's built-in viewer (if rstudioapi is available)

  2. The viewer specified in getOption("viewer")

  3. The default browser specified in getOption("browser")

To control which viewer is used, you can set the following options:

If no viewer is available, the function will stop with an error message.

Value

Invisibly returns NULL. The function's primary purpose is to open the dataset documentation in a viewer window.

Global Options

The following global options control package behavior:

Examples


rddocs(dataset = "Titanic", package ="Stat2Data")
rddocs("iris", "datasets")


[Package Rdatasets version 0.0.1 Index]