mynewf3: A constructor function for t-test with categorical and...

Description Usage Arguments Details Value Examples

View source: R/myttest.R

Description

The constructor function creates a t-test that will read in categorical data for x and continuous data for y implementing subsetting a list in this code. Essentially it reads in a data frame.

Usage

1
mynewf3(x, y, Var.equal = True, paired = True)

Arguments

x

vector of categorical data (need different sample code than the one provided for the project)

y

vector of continuous data

Details

Need tidyverse, dplyr, and magrittr packages to run this.

Value

t-test result

Examples

1
2
3
4
5
6
Can read in a csv file such as dat <- read.csv("..."). This example is different than one that must be shown for project.
example:
women_weight <- c(38.9, 61.2, 73.3, 21.8, 63.4, 64.6, 48.4, 48.8, 48.5)
men_weight <- c(67.8, 60, 63.4, 76, 89.4, 73.3, 67.3, 61.3, 62.4)
my_data <- data.frame(
group = rep(c("Woman", "Man"), each = 9),

ctstrick61/s3oopcs documentation built on Dec. 19, 2021, 7:03 p.m.