Skip to content

Commit

Permalink
Update documentation tags to roxygen2 7.3.1 requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanbuuren committed Apr 17, 2024
1 parent f20f17d commit e8a062a
Show file tree
Hide file tree
Showing 31 changed files with 85 additions and 50 deletions.
1 change: 1 addition & 0 deletions R/convergence.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ convergence <- function(data, diagnostic = "all", parameter = "mean", ...) {
}

# function to extend is.nan() to data.frame objects
#' @export
is.nan.data.frame <- function(x) do.call(cbind, lapply(x, is.nan))
5 changes: 4 additions & 1 deletion R/df.residual.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
#' @export
df.residual.mira <- function(object, ...) {
fit <- object$analyses[[1]]
df.residual(fit)
}


#' @export
df.residual.lme <- function(object, ...) {
object$fixDF[["X"]][1]
}


#' @export
df.residual.mer <- function(object, ...) {
sum(object@dims[2:4] * c(1, -1, -1)) + 1
}


#' @export
df.residual.multinom <- function(object, ...) {
nrow(object$residuals) - object$edf
}
2 changes: 1 addition & 1 deletion R/edit.setup.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
edit.setup <- function(data, setup,
mice.edit.setup <- function(data, setup,
allow.na = FALSE,
remove.constant = TRUE,
remove.collinear = TRUE,
Expand Down
4 changes: 2 additions & 2 deletions R/formula.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ name.formulas <- function(formulas, prefix = "F") {
check.formulas <- function(formulas, data) {
formulas <- name.formulas(formulas)
formulas <- handle.oldstyle.formulas(formulas, data)
formulas <- lapply(formulas, expand.dots, data)
formulas <- lapply(formulas, mice.expand.dots, data)
# escape if formula is list of two formula's
if (any(sapply(formulas, is.list))) {
return(formulas)
Expand Down Expand Up @@ -238,7 +238,7 @@ hasdot <- function(f) {
}
}

expand.dots <- function(formula, data) {
mice.expand.dots <- function(formula, data) {
if (!is.formula(formula)) {
return(formula)
}
Expand Down
4 changes: 2 additions & 2 deletions R/mice-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
#' depend on the operating system. See the discussion in the
#' "R Installation and Administration" guide for further information.
#'
#' @docType package
#' @aliases mice-package
#'
#' @name mice
Expand All @@ -92,4 +91,5 @@
#' \href{https://stefvanbuuren.name/fimd/}{\emph{Flexible Imputation of Missing Data. Second Edition.}}
#' Chapman & Hall/CRC. Boca Raton, FL.
#' @useDynLib mice, .registration = TRUE
NULL
#' @keywords internal
"_PACKAGE"
4 changes: 2 additions & 2 deletions R/mice.R
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ mice <- function(data,
visitSequence <- check.visitSequence(visitSequence,
data = data, where = where, blocks = blocks
)
predictorMatrix <- edit.predictorMatrix(
predictorMatrix <- mice.edit.predictorMatrix(
predictorMatrix = predictorMatrix,
visitSequence = visitSequence,
user.visitSequence = user.visitSequence,
Expand All @@ -436,7 +436,7 @@ mice <- function(data,
visitSequence = visitSequence,
post = post
)
setup <- edit.setup(data, setup, ...)
setup <- mice.edit.setup(data, setup, ...)
method <- setup$method
predictorMatrix <- setup$predictorMatrix
visitSequence <- setup$visitSequence
Expand Down
1 change: 1 addition & 0 deletions R/mipo.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ process_mipo <- function(z, x, conf.int = FALSE, conf.level = .95,
z
}

#' @export
vcov.mipo <- function(object, ...) {
so <- diag(object$t)
dimnames(so) <- list(object$term, object$term)
Expand Down
2 changes: 1 addition & 1 deletion R/predictorMatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ check.predictorMatrix <- function(predictorMatrix,
)
}

edit.predictorMatrix <- function(predictorMatrix,
mice.edit.predictorMatrix <- function(predictorMatrix,
visitSequence,
user.visitSequence,
maxit) {
Expand Down
30 changes: 30 additions & 0 deletions man/mice.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.cart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.lasso.logreg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.lasso.norm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.lasso.select.logreg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.lasso.select.norm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.lda.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mice.impute.logreg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mice.impute.logreg.boot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.mean.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.midastouch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.mnar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.mpmm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mice.impute.norm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mice.impute.norm.boot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8a062a

Please sign in to comment.