Provides Access to Versioned Example Data Files
Source:R/wdds_schema_versions.R
wdds_example_data.Rd
Since schema versions may change during the life cycle of project, it is important that users have access to all schema versions via this package. This function allows you to quickly retrieve whichever version of the example data you may need.
Arguments
- version
Character or NULL. Version of the wdds deposit. Leave as NULL to see all versions. Default is NULL to return a character vector of versions.
- file
Character or NULL. Specific file from the wdds deposit. Leave as NULL to see all files in a version. Default is NULL to return all files associated with a given version.
Details
This function does three things.
Shows all versions of the schema in the package if version is NULL.
Provides paths to all example data files associated with a version of the schema if version is provided and file is NULL.
Provides a specific file path in a specific version of the example data if both file and version are provided.
See also
Other WDDS deposit:
batch_download_deposit_versions()
,
download_deposit_version()
,
list_deposit_versions()
,
sanitize_version()
,
set_wdds_version()
,
wdds_data_templates()
,
wdds_json()
Examples
# see which versions are in the package
wdds_example_data()
#> The following versions of the standard are availble in the package:
#> - latest
#> - v_1_0_0
#> - v_1_0_1
#> - v_1_0_2
#> - v_1_0_3
#> [1] "latest" "v_1_0_0" "v_1_0_1" "v_1_0_2" "v_1_0_3"
# see files associated with a version
wdds_example_data(version = "latest")
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/Becker_demo_dataset.xlsx
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/becker_project_metadata.csv
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/example_project_metadata.csv
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/minimal_example.json
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/minimal_example_disease_data.csv
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/minimal_example_project_metadata.csv
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/my_interesting_disease_data.csv
#> /home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/latest/example_data/my_project_metadata.csv
# get the file path for a specific file
wdds_example_data(version = "v_1_0_2", file = "Becker_demo_dataset.xlsx")
#> [1] "/home/runner/work/_temp/Library/wddsWizard/extdata/wdds_archive/v_1_0_2/example_data/Becker_demo_dataset.xlsx"