From 6b0a0a251d855db4473d1f0d890076d4a6c57c69 Mon Sep 17 00:00:00 2001 From: LuisDVA Date: Sun, 6 Oct 2024 20:57:04 -0600 Subject: [PATCH] sort out dependencies --- DESCRIPTION | 6 ++++++ NAMESPACE | 1 + R/helpers.R | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0625b8e..06d49f4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,3 +14,9 @@ Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2.9000 URL: https://github.com/luisDVA/hexsession, https://luisdva.github.io/hexsession/ BugReports: https://github.com/luisDVA/hexsession/issues +Imports: + base64enc, + chromote, + jsonlite, + magick, + purrr diff --git a/NAMESPACE b/NAMESPACE index a6d5b89..5cb4624 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -6,3 +6,4 @@ export(make_tile) export(snap_tile) importFrom(base64enc,base64encode) importFrom(jsonlite,toJSON) +importFrom(utils,packageDescription) diff --git a/R/helpers.R b/R/helpers.R index 9db4d7f..916c53a 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -31,9 +31,10 @@ find_logopaths <- function(imagepaths) { #' Get package URLs #' @param pkgnames Character vector of package names +#' @importFrom utils packageDescription #' @return A vector of package URLs pkgurls <- function(pkgnames) { - allurls <- purrr::map(pkgnames,\(x) packageDescription(x,field="URL")) + allurls <- purrr::map(pkgnames,\(x) packageDescription(x,fields="URL")) splturls <- purrr::map(allurls,\(x) unlist(strsplit(x,",|\n"))) purrr::map_chr(splturls,`[`,1) }