Package: traits.build 2.0.0

Daniel Falster

traits.build: A workflow for harmonising trait data from diverse sources into a documented standard structure

The `traits.build` package provides a workflow to harmonise trait data from diverse sources. The code was originally built to support AusTraits (see Falster et al 2021, <doi:10.1038/s41597-021-01006-6>, <https://github.com/traitecoevo/autraits.build>) and has been generalised here to support construction of other trait databases. For detailed instructions and examples see <https://traitecoevo.github.io/traits.build-book/>.

Authors:Daniel Falster [cre, aut], Elizabeth Wenk [cur, aut], Sophie Yang [cur, aut], Fonti Kar [aut, ctb], ARDC [fnd], ARC [fnd]

traits.build_2.0.0.tar.gz
traits.build_2.0.0.zip(r-4.5)traits.build_2.0.0.zip(r-4.4)traits.build_2.0.0.zip(r-4.3)
traits.build_2.0.0.tgz(r-4.4-any)traits.build_2.0.0.tgz(r-4.3-any)
traits.build_2.0.0.tar.gz(r-4.5-noble)traits.build_2.0.0.tar.gz(r-4.4-noble)
traits.build_2.0.0.tgz(r-4.4-emscripten)traits.build_2.0.0.tgz(r-4.3-emscripten)
traits.build.pdf |traits.build.html
traits.build/json (API)
NEWS

# Install 'traits.build' in R:
install.packages('traits.build', repos = c('https://traitecoevo.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/traitecoevo/traits.build/issues

Pkgdown site:https://traitecoevo.github.io

On CRAN:

3.95 score 9 stars 25 scripts 46 exports 99 dependencies

Last updated 25 days agofrom:e15d2a1ad7. Checks:1 OK, 6 WARNING. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKDec 20 2024
R-4.5-winWARNINGDec 20 2024
R-4.5-linuxWARNINGDec 20 2024
R-4.4-winWARNINGDec 20 2024
R-4.4-macWARNINGDec 20 2024
R-4.3-winWARNINGDec 20 2024
R-4.3-macWARNINGDec 20 2024

Exports:%>%bind_databasesbuild_add_versionbuild_combinebuild_setup_pipelinecheck_pivot_duplicatesconvert_df_to_listconvert_list_to_df1convert_list_to_df2dataset_builddataset_configuredataset_find_taxondataset_processdataset_reportdataset_testdataset_update_taxonomyflatten_databaseget_schemaget_unit_conversionsmetadata_add_contextsmetadata_add_locationsmetadata_add_source_bibtexmetadata_add_source_doimetadata_add_substitutionmetadata_add_substitutions_listmetadata_add_substitutions_tablemetadata_add_taxonomic_changemetadata_add_taxonomic_changes_listmetadata_add_traitsmetadata_check_custom_R_codemetadata_create_templatemetadata_exclude_observationsmetadata_find_taxonomic_changemetadata_remove_taxonomic_changemetadata_update_taxonomic_changeread_csv_charread_metadatautil_df_to_listutil_extract_list_elementutil_get_SHAutil_get_versionutil_kable_styling_htmlutil_list_to_df1util_list_to_df2write_metadatawrite_plaintext

Dependencies:askpassaustraitsbackportsbase64encbibtexbitbit64briobslibcachemcallrclicliprcolorspacecpp11crayoncurldescdiffobjdigestdplyrevaluatefansifarverfastmapfontawesomeforcatsfsgenericsgit2rgluehighrhmshtmltoolshttrjanitorjquerylibjsonlitekableExtraknitrlabelinglifecyclelubridatemagrittrmemoisemimemunsellopensslpillarpkgbuildpkgconfigpkgloadplyrpraiseprettyunitsprocessxprogresspspurrrR.cacheR.methodsS3R.ooR.utilsR6rappdirsRColorBrewerRcppreadrRefManageRrlangrmarkdownrprojrootrstudioapisassscalessnakecasestringistringrstylersvglitesyssystemfontstestthattibbletidyrtidyselecttimechangetinytextzdbutf8vctrsviridisLitevroomwaldowhiskerwithrxfunxml2yaml

Readme and manuals

Help Manual

Help pageTopics
Format BibEntry using RefManageRbib_print
Add version information to AusTraitsbuild_add_version
Combine all the AusTraits studies into the compiled AusTraits databasebuild_combine
Update the 'remake.yml' file with new studiesbuild_setup_pipeline
Identify duplicates preventing pivoting widercheck_pivot_duplicates
Test whether a dataset can pivot widercheck_pivot_wider
Format a tree structure from a vectorcreate_tree_branch
Build datasetdataset_build
Configure AusTraits database objectdataset_configure
Find list of unique datasets within compilation containing specified taxadataset_find_taxon
Load Datasetdataset_process
Build reports for listed datasetsdataset_report
Test whether specified 'dataset_id' has the correct setupdataset_test
Test whether specified 'dataset_id' has the correct setupdataset_test_worker
Apply taxonomic updates to austraits_rawdataset_update_taxonomy
Load schema for an traits.build data compilation (excluding traits)get_schema
Make unit conversion functionsget_unit_conversions
For specified 'dataset_id' import context data from a dataframemetadata_add_contexts
For specified 'dataset_id' import location data from a dataframemetadata_add_locations
Adds citation details to a metadata file for given studymetadata_add_source_bibtex
Adds citation details from a doi to a metadata file for a 'dataset_id'metadata_add_source_doi
Add a categorical trait value substitution into a metadata file for a 'dataset_id'metadata_add_substitution
Add a dataframe of trait value substitutions into a metadata file for a dataset_idmetadata_add_substitutions_list
Substitutions from a dataframemetadata_add_substitutions_table
Add a taxonomic change into the 'metadata.yml' file for a 'dataset_id'metadata_add_taxonomic_change
Add a list of taxonomic updates into a metadata file for a 'dataset_id'metadata_add_taxonomic_changes_list
For specified 'dataset_id', populate columns for traits into metadatametadata_add_traits
Check the output of running 'custom_R_code' specified in the metadata for specified 'dataset_id'metadata_check_custom_R_code
Create a template of file 'metadata.yml' for specified 'dataset_id'metadata_create_template
Exclude observations in a yaml file for a 'dataset_id'metadata_exclude_observations
Find 'dataset_id''s with a given taxonomic changemetadata_find_taxonomic_change
Path to the 'metadata.yml' file for specified 'dataset_id'metadata_path_dataset_id
Remove a taxonomic change from a yaml file for a 'dataset_id'metadata_remove_taxonomic_change
Update a taxonomic change into a yaml file for a 'dataset_id'metadata_update_taxonomic_change
Select column by usermetadata_user_select_column
Select variable names by usermetadata_user_select_names
Create a string of random lettersnotes_random_string
Add a note to the note recorder as a new rownotetaker_add_note
Create a tibble with two columns with note and linknotetaker_as_note
Return a specific row from notesnotetaker_get_note
Print all notesnotetaker_print_all
Print note (needs review?)notetaker_print_note
Print a specific row from notesnotetaker_print_notes
Start note recorder (needs review?)notetaker_start
Add or remove columns of dataprocess_add_all_columns
Convert units to desired typeprocess_convert_units
Create entity idprocess_create_observation_id
Apply custom data manipulationsprocess_custom_code
Flag any excluded observationsprocess_flag_excluded_observations
Flag values outside of allowable rangeprocess_flag_out_of_range_values
Flag values with unsupported charactersprocess_flag_unsupported_characters
Flag any unrecognised traitsprocess_flag_unsupported_traits
Flag disallowed trait values and disallowed charactersprocess_flag_unsupported_values
Format context data from list to tibbleprocess_format_contexts
Format contributors from list into tibbleprocess_format_contributors
Format location data from list to tibbleprocess_format_locations
Function to generate sequence of integer ids from vector of names Determines number of 00s needed based on number of recordsprocess_generate_id
Function to generate sequence of integer ids for methodsprocess_generate_method_ids
Process a single datasetprocess_parse_data
Standardise species namesprocess_standardise_names
Apply taxonomic updatesprocess_taxonomic_updates
Generate unit conversion nameprocess_unit_conversion_name
Read in a csv as a tibble with column types as charactersread_csv_char
Read in a 'metadata.yml' file for a studyread_metadata
Read the 'metadata.yml' file for specified 'dataset_id'read_metadata_dataset
Read yaml (from package yaml)read_yaml
Add an item to the end of a listutil_append_to_list
Convert BibEntry object to a listutil_bib_to_list
Check values in one vector against values in another vectorutil_check_all_values_in
Check values in a vector do not contain disallowed charactersutil_check_disallowed_chars
Convert all columns in data frame to characterutil_df_convert_character
Convert dataframe to listutil_df_to_list
Extract a trait element from the definitions$traits$elementsutil_extract_list_element
Get SHA string from Github repository for latest commitutil_get_SHA
Retrieve version for compilation from definitionsutil_get_version
Format table with kable and default styling for htmlutil_kable_styling_html
Convert a list of elements into a BibEntry objectutil_list_to_bib
Convert a list with single entries to dataframeutil_list_to_df1
Convert a list of lists to dataframeutil_list_to_df2
Convert NULL values to a different valueutil_replace_null
Split and sort cells with multiple valuesutil_separate_and_sort
Standardise doiutil_standardise_doi
Write 'metadata.yml' for a studywrite_metadata
Write the YAML representation of 'metadata.yml' for specified 'dataset_id' to file 'data/dataset_id/metadata.yml'write_metadata_dataset
Export AusTraits version as plain textwrite_plaintext
write yaml (from package yaml)write_yaml