Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bbolker committed Oct 28, 2024
1 parent e93a1b9 commit 56668d2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/VarCorr_tidiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tidy.VarCorr.lme <- function(

if(inherits(object, "VarCorr.lme")) {
## Need to convert nlme object to a proper tibble
object <- convert_VarCorr.MerMod_to_VarCorr.lme(object)
object <- convert_VarCorr.lme(object)
}

if (conf.int) {
Expand Down Expand Up @@ -94,12 +94,12 @@ tidy.VarCorr.lme <- function(
# 4 Residual NA NA 655. 25.6


#' This function converts VarCorr on a nlme object to a tibble form of an lme4 object
#' This function converts VarCorr on a nlme object to a tibble
#' i.e. VarCorr.merMod -> tibble of VarCorr.lme
#' @noRd
#' @param object A variance-correlation component of nlme::lme object.
#' @return The tibble version of VarCorr.lme object from lme4 package.
convert_VarCorr.MerMod_to_VarCorr.lme <- function(object){
#' @return A useful (?) tibble
convert_VarCorr.lme <- function(object){
A <- as.matrix(object)
row.residual <- stringr::str_which("Residual", rownames(A))

Expand Down
22 changes: 22 additions & 0 deletions man/tidy.VarCorr.lme.Rd

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

0 comments on commit 56668d2

Please sign in to comment.