Skip to content

Commit 4dea0d5

Browse files
committed
fixed some undeclared dependencies for R CMD check
1 parent 9802c30 commit 4dea0d5

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Suggests:
3939
pander,
4040
xtable,
4141
rrelaxiv,
42-
magrittr
42+
magrittr,
43+
MASS
4344
Enhances:
4445
CBPS,
4546
haven

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ importFrom(stats,terms)
164164
importFrom(stats,terms.formula)
165165
importFrom(stats,update)
166166
importFrom(stats,update.formula)
167+
importFrom(stats,var)
167168
importFrom(tibble,as_tibble)
168169
importFrom(tibble,enframe)
169170
importFrom(tibble,tibble)

R/utilities.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ missing_x_msg <- function(x_str, data_str, ...) {
139139
msg_tail)
140140
}
141141

142+
#' @importFrom stats var
142143
scale_addressing_ties <- function(n, cv) {
143144
vuntied <- var(1:n)
144145
rat <- sqrt(vuntied/diag(cv))

tests/testthat/test.utilities.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Tests for utility functions
33
################################################################################
44

5+
library(MASS)
6+
57
context("Utility Functions")
68

79
test_that("toZ", {
@@ -80,5 +82,5 @@ test_that("safe_invert", {
8082
B <- matrix(runif(15), 5, 3)
8183
symmetric_matrix <- B %*% t(B)
8284
inv_B <- safe_invert(B)
83-
expect_equal(inv_B, MASS::ginv(B))
85+
expect_equal(inv_B, ginv(B))
8486
})

0 commit comments

Comments
 (0)