Skip to content

Commit

Permalink
* IMPROVED: umxAPA handles tibbles
Browse files Browse the repository at this point in the history
  • Loading branch information
tbates committed Dec 10, 2024
1 parent 971533d commit 8de3582
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion R/fit_and_reporting.R
Original file line number Diff line number Diff line change
Expand Up @@ -4603,7 +4603,10 @@ umxAPA <- function(obj = .Last.value, se = NULL, p = NULL, std = FALSE, digits =
}
cat(o)
invisible(o)
}else if("data.frame" == class(obj)[[1]]){
}else if(class(obj)[[1]] %in% c("data.frame", "tbl_df") ) {
if(class(obj)[[1]] =="tbl_df"){
obj = data.frame(obj)
}
# Generate a summary of correlation and means
# TODO umxAPA could upgrade strings to factors here (instead of stopping)...
if(!any(is.na(cols))){
Expand Down
4 changes: 2 additions & 2 deletions R/misc_and_utility.R
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ umx_apply <- function(FUN, of, by = c("columns", "rows"), ...) {

#' umx_as_numeric
#'
#' Convert each column of a dataframe to numeric
#' Apply as.numeric to multiple columns of a dataframe.
#'
#' @param df A [data.frame()] to convert
#' @param which which columns to convert (default (null) selects all)
Expand Down Expand Up @@ -6528,7 +6528,7 @@ umx_merge_randomized_columns <- function(colNames, df, levels = colNames, newVar
return(df)
}

#' Change data family data from wide (2 twins per row) to long format.
#' Change twin data from wide (2 twins per row) to long format.
#'
#' @description
#' Just detects the data columns for twin 1, and twin 2, then returns them stacked
Expand Down
2 changes: 1 addition & 1 deletion man/umx_as_numeric.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/umx_wide2long.Rd

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

0 comments on commit 8de3582

Please sign in to comment.