diff --git a/R/fit_and_reporting.R b/R/fit_and_reporting.R index 0bd7f07e..9b47f4e0 100644 --- a/R/fit_and_reporting.R +++ b/R/fit_and_reporting.R @@ -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))){ diff --git a/R/misc_and_utility.R b/R/misc_and_utility.R index 1b5e7f33..283c8aa8 100644 --- a/R/misc_and_utility.R +++ b/R/misc_and_utility.R @@ -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) @@ -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 diff --git a/man/umx_as_numeric.Rd b/man/umx_as_numeric.Rd index 9273a9ce..55798a41 100644 --- a/man/umx_as_numeric.Rd +++ b/man/umx_as_numeric.Rd @@ -17,7 +17,7 @@ umx_as_numeric(df, which = NULL, force = FALSE) - data.frame } \description{ -Convert each column of a dataframe to numeric +Apply as.numeric to multiple columns of a dataframe. } \examples{ # make mpg into string, and cyl into a factor diff --git a/man/umx_wide2long.Rd b/man/umx_wide2long.Rd index f804540c..6bb17c33 100644 --- a/man/umx_wide2long.Rd +++ b/man/umx_wide2long.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/misc_and_utility.R \name{umx_wide2long} \alias{umx_wide2long} -\title{Change data family data from wide (2 twins per row) to long format.} +\title{Change twin data from wide (2 twins per row) to long format.} \usage{ umx_wide2long(data, sep = "_T", verbose = FALSE) }