From 4d49f13be8cd29648e2ec174e503dd9705d39186 Mon Sep 17 00:00:00 2001 From: "Lewis A. Jones" <41071747+LewisAJones@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:29:21 +0100 Subject: [PATCH] add package citation (#94) --- NAMESPACE | 1 + R/get_attribution.R | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index 6e1ab3a8..422b9533 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -78,3 +78,4 @@ importFrom(stats,setNames) importFrom(utils,browseURL) importFrom(utils,menu) importFrom(utils,packageDescription) +importFrom(utils,packageVersion) diff --git a/R/get_attribution.R b/R/get_attribution.R index 918b995c..3c940238 100644 --- a/R/get_attribution.R +++ b/R/get_attribution.R @@ -20,6 +20,7 @@ #' `TRUE`, a text paragraph with the contributor name, year of contribution, #' and license type is returned. #' @importFrom knitr combine_words +#' @importFrom utils packageVersion #' @export #' @examples #' # Get valid uuid @@ -125,7 +126,9 @@ get_attribution <- function(uuid = NULL, img = NULL, text = FALSE) { } if (text) { att <- paste0("Organism silhouettes are from PhyloPic ", - "(https://www.phylopic.org/; T. Michael Keesey, 2023). ", + "(https://www.phylopic.org/; T. Michael Keesey, 2023) ", + "and were added using the rphylopic R package ver. ", + packageVersion("rphylopic"), " (Gearty & Jones, 2023). ", att) return(message(att)) }