read_data_file.Rd
This function reads a CSV or similarly formatted data file located in the package's `inst/extdata/` directory. It safely constructs the file path and returns the content as a data frame.
read_data_file(filename, sep = ",")
A data frame containing the data read from the specified file.
This function is useful for accessing example datasets or reference tables shipped within the package without requiring users to manually specify full file paths. It verifies the file exists inside the package before attempting to read it.
if (FALSE) { # \dontrun{
df <- read_data_file("countries_continent_region.csv", sep = ";")
} # }