t_test: Independent samples t-test

View source: R/statistics-utils.R

t_testR Documentation

Independent samples t-test

Description

A wrapper to stats::t.test() with var.equal = TRUE.

Usage

t_test(formula, data)

Arguments

formula

A two sided formula with one variable on either side, e.g. y ~ x, where the left hand side, dependent, variable is a numeric variable in data and the right hand side, independent, variable is a categorical or factor variable in data, and which has only two distinct values.

data

A data frame that contains the dependent and independent variables.

Value

A list with class "htest" as returned by stats::t.test().

Examples

t_test(trustworthy ~ face_sex, data = faithfulfaces)
  

mark-andrews/psyntur documentation built on Nov. 18, 2024, 7:17 a.m.