Skip to content

var.equal in t_test() can only be used with explicit TRUE/FALSE #44

Description

@juliuspfadt

I came upon this trying to implement things for @jomulder in JASP. It seems the way some arguments are passed in t_test() (

var_eq <- cl[["var.equal"]]
) does not allow any statements that need "evaluation". My example:

dt <- read.csv("https://raw.githubusercontent.com/jasp-stats/jasp-desktop/development/Resources/Data%20Sets/debug.csv")
options <- list(variances = "equal")
bain::t_test(dt$contNormal, dt$contBinom, var.equal = options[["variances"]] == "equal")

varEqual <- options[["variances"]] == "equal"
bain::t_test(dt$contNormal, dt$contBinom, var.equal = varEqual)

neither of the two ways to pass a boolean to the function works. I think it should.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions