get_data_info {checkhelper} | R 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)
[Package checkhelper version 0.1.1 Index]