From ba81220aed6fab2ec6d03d4c00ecb5f4fe1f5ff0 Mon Sep 17 00:00:00 2001 From: Will Cornwell Date: Thu, 27 Jul 2023 14:20:05 +1000 Subject: [PATCH] Cran prep (#67) * fixing notes from devtools::check() with fonti's knowledge and tricks --- R/ausflora-package.R | 58 ++++++++++++++++++++++++++++++++++++------ R/clean_names.R | 2 ++ man/update_taxonomy.Rd | 2 ++ 3 files changed, 54 insertions(+), 8 deletions(-) diff --git a/R/ausflora-package.R b/R/ausflora-package.R index 669ba7d4..15d5631f 100644 --- a/R/ausflora-package.R +++ b/R/ausflora-package.R @@ -2,32 +2,74 @@ #' #' @description #' The process of standardising taxon names is necessary when working with -#' biodiversity data. 'ausflora' uses the Australian Plant Name Index (APNI) -#' and the Australian Plant Census (APC) to align and update plant taxon names +#' biodiversity data. 'ausflora' uses the Australian Plant Name Index (APNI) +#' and the Australian Plant Census (APC) to align and update plant taxon names #' to current, accepted standards. 'ausflora' can also supply information about #' the established status of plant taxa across different states/territories. -#' +#' #' @name ausflora #' @docType package -#' @references If you have any questions, comments or suggestions, please +#' @references If you have any questions, comments or suggestions, please #' submit an issue at our [GitHub repository](https://github.com/traitecoevo/ausflora/issues) #' @keywords internal #' @section Functions: #' **Standarise taxon names** -#' +#' #' * [load_taxonomic_resources] #' * [create_taxonomic_update_lookup] #' * [align_taxa] #' * [update_taxonomy] -#' +#' #' **Established status by region** -#' +#' #' * [state_diversity_counts] #' * [create_species_state_origin_matrix] #' * [native_anywhere_in_australia] -#' +#' "_PACKAGE" ## usethis namespace: start ## usethis namespace: end NULL +utils::globalVariables( + c( + ".", + "acceptedNameUsage", + "acceptedNameUsageID", + "aligned_name", + "aligned_reason", + "alternativeTaxonomicStatusClean", + "binomial", + "canonicalName", + "canonical_name", + "ccAttributionIRI", + "checked", + "cleaned_name", + "family", + "fuzzy_match_genus", + "fuzzy_match_genus_APNI", + "fuzzy_match_genus_known", + "genus", + "my_order", + "nameElement", + "nameType", + "native_anywhere", + "original_name", + "scientificName", + "scientificNameAuthorship", + "scientificNameID", + "stripped_canonical", + "stripped_canonical2", + "stripped_name", + "stripped_name2", + "subclass", + "taxonDistribution", + "taxonID", + "taxonIDClean", + "taxonRank", + "taxonomicStatus", + "taxonomicStatusClean", + "taxonomic_ref", + "trinomial" + ) +) diff --git a/R/clean_names.R b/R/clean_names.R index 6c286dd6..9fdda0fa 100644 --- a/R/clean_names.R +++ b/R/clean_names.R @@ -200,7 +200,9 @@ redistribute <- function(data) { #' update_taxonomy(c("Eucalyptus pauciflora", "Acacia victoriae")) #' #' # Update taxonomy for two plant names and save the result to a CSV file +#' \dontrun{ #' update_taxonomy(c("Eucalyptus pauciflora", "Acacia victoriae"), output = "updated_taxonomy.csv") +#' } update_taxonomy <- function(aligned_names, output = NULL, resources = load_taxonomic_resources()) { diff --git a/man/update_taxonomy.Rd b/man/update_taxonomy.Rd index a532f022..5cdfa665 100644 --- a/man/update_taxonomy.Rd +++ b/man/update_taxonomy.Rd @@ -49,8 +49,10 @@ to their current accepted name. update_taxonomy(c("Eucalyptus pauciflora", "Acacia victoriae")) # Update taxonomy for two plant names and save the result to a CSV file +\dontrun{ update_taxonomy(c("Eucalyptus pauciflora", "Acacia victoriae"), output = "updated_taxonomy.csv") } +} \seealso{ load_taxonomic_resources