Description Usage Arguments Value Examples
View source: R/prep_attributes.R
Extract variableNames
from data file(s) and add them to attributes.csv
.
The helper validate_file_paths
can be used to create vectors of
valid file paths that can be checked and then passed as data_path
argument
to prep_attributes
.
1 2 3 4 5 | prep_attributes(
data_path = "data",
attributes_path = "data/metadata/attributes.csv",
...
)
|
data_path |
character vector of either:
|
attributes_path |
path to the |
... |
parameters passed to |
prep_attributes()
updates the attributes.csv
and writes to
attributes_path
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
create_spice()
# extract attributes from all `csv`, `tsv`, `rds` files in the data folder
# (non recursive)
prep_attributes()
# recursive
prep_attributes(recursive = TRUE)
# extract attributes from a single file using file path
data_path <- system.file("example-dataset","BroodTables.csv",
package = "dataspice")
prep_attributes(data_path)
# extract attributes from a single file by file path pattern matching
data_path <- system.file("example-dataset", package = "dataspice")
prep_attributes(data_path, pattern = "StockInfo")
# extract from a folder using folder path
data_path <- system.file("example-dataset", package = "dataspice")
prep_attributes(data_path)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.