get_dataset | R Documentation |
marginaleffects
or RdatasetsDownloads a dataset from the marginaleffects
or the Rdatasets archives, and return it as a data frame. Opens the documentation as an HTML page. Search available datasets.
https://vincentarelbundock.github.io/Rdatasets/
get_dataset(
dataset = "thornton",
package = "marginaleffects",
docs = FALSE,
search = NULL
)
dataset |
String. Name of the dataset to download.
|
package |
String. Package name that originally published the data. |
docs |
Logical. If TRUE open the documentation using |
search |
Regular expression. Download the dataset index from Rdatasets; search the "Package", "Item", and "Title" columns; and return the matching rows. |
A data frame containing the dataset. library(marginaleffects)
dat <- get_dataset("Titanic", "Stat2Data")
head(dat)
get_dataset(search = "(?i)titanic")
# View documentation in the browser
# get_dataset("Titanic", "Stat2Data", docs = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.