Skip to content

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

@juliuspfadt

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.

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