Skip to content

Commit

Permalink
Replace ::: with utils::getFromNamespace to address package notes
Browse files Browse the repository at this point in the history
  • Loading branch information
domjarkey committed Sep 22, 2022
1 parent 8de8960 commit 14cd0dd
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions R/tabbook-additions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")))
}


Expand Down

0 comments on commit 14cd0dd

Please sign in to comment.