Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Aug 31, 2024
1 parent 9e5fd6d commit cd94652
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions R/p_direction.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,16 @@ p_direction.data.frame <- function(x, method = "direct", null = 0, rvar_col = NU
return(.p_direction_df(x, method = method, null = null, ...))
}

stopifnot(length(rvar_col) == 1L,
is.character(rvar_col),
rvar_col %in% colnames(x))

if (length(rvar_col) != 1L && !rvar_col %in% colnames(x)) {
insight::format_error("The `rvar_col` argument must be a single, valid column name.")
}

out <- p_direction(x[[rvar_col]], method = method, null = null, ...)
x[["pd"]] <- out[["pd"]]
x
}


#' @keywords internal
.p_direction_df <- function(x, method = "direct", null = 0, ...) {
obj_name <- insight::safe_deparse_symbol(substitute(x))
Expand Down
2 changes: 1 addition & 1 deletion man/bayestestR-package.Rd

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

5 changes: 4 additions & 1 deletion man/p_direction.Rd

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

0 comments on commit cd94652

Please sign in to comment.