get_data_info: Get information of a .Rda file stored inside the 'data/'...

View source: R/get_data_info.R

get_data_infoR Documentation

Get information of a .Rda file stored inside the 'data/' folder

Description

Get information of a .Rda file stored inside the 'data/' folder

Usage

get_data_info(name, description, source)

Arguments

name

name of the file that exists in "data/"

description

description for the data

source

source of data

Value

list of information from a data.frame

See Also

use_data_doc() to add the information directly as roxygen documentation in your package.

Examples

# Store a dataset as rda file
path_project <- tempfile(pattern = "data-")
path_data <- file.path(path_project, "data")
dir.create(path_data, recursive = TRUE)
path_rda <- file.path(path_data, "iris.rda")
save(iris, file = path_rda)

# Get its information
withr::with_dir(
  path_project,
  {
    get_data_info("iris", "Iris data frame", source = "ThinkR")
  }
)

# Clean userspace
unlink(path_project, recursive = TRUE)


ThinkR-open/checkhelper documentation built on Jan. 26, 2024, 4:16 p.m.