From 14cd0ddf9e547b30090ed2eee4ff61f799055a0b Mon Sep 17 00:00:00 2001 From: Dom Jarkey Date: Thu, 22 Sep 2022 15:03:06 +0100 Subject: [PATCH] Replace ::: with utils::getFromNamespace to address package notes --- R/tabbook-additions.R | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/R/tabbook-additions.R b/R/tabbook-additions.R index e4d64fa..974f870 100644 --- a/R/tabbook-additions.R +++ b/R/tabbook-additions.R @@ -321,20 +321,24 @@ tabBookSingle_crunchtabs <- function(multitable, dataset, weight) { ) out <- download_result(result) - return(crunch:::TabBookResult(out)) + TabBookResult <- utils::getFromNamespace("TabBookResult", "crunch") + return(TabBookResult(out)) } varFilter <- function(dataset) { - crunch:::variablesFilter(dataset) + variablesFilter <- utils::getFromNamespace("variablesFilter", "crunch") + variablesFilter(dataset) } download_result <- function(result) { - crunch:::retry(crunch::crGET(result), wait = 0.5) # For mocks + retry <- utils::getFromNamespace("retry", "crunch") + retry(crunch::crGET(result), wait = 0.5) # For mocks } tabBookResult <- function(...) { - crunch:::TabBookResult(...) # For mocks + TabBookResult <- utils::getFromNamespace("TabBookResult", "crunch") + TabBookResult(...) # For mocks } #' @importFrom stats ave @@ -485,7 +489,8 @@ tabBookWeightSpec <- function(dataset, weights, append_default_wt = TRUE) { getCatalog <- function(dataset) { - crunch:::ShojiCatalog(crGET(self(allVariables(dataset)), query = list(relative = "on"))) + ShojiCatalog <- utils::getFromNamespace("ShojiCatalog", "crunch") + ShojiCatalog(crGET(self(allVariables(dataset)), query = list(relative = "on"))) }