List Datasets in a Package
list_data.Rd
This function lists all the files in the data
,inst/extdata
and
internal binaries
directories of a specified R package.
Value
A data frame with four columns:
directory
The directory (
data
,extdata
,intdata
) where the file is located.name
The name for each dataset found in directories.
extension
The file extension for each dataset found in directories
duplicate
Logical vector (TRUE/FALSE) if the file name (with extension) exists more than once. Only flags from the second occurrence. This is useful for packages which have not been built making .rda files internal
Examples
if (FALSE) { # \dontrun{
# List all files in the directories of the "ggplot2" package
files <- list_data(package_name = "ggplot2")
print(files)
} # }