pst: Generate Output for Paired Samples t-test

Description Usage Arguments Value Examples

View source: R/pst.R

Description

This function will generate the output for a paired samples t-test.

Usage

1
pst(x, y = NULL, z = NULL, tails = 2)

Arguments

x

A data frame column with the first variable to compare, a formula can also be passed in (~Var or Var~1)

y

A data frame column with the second variable to compare (~Var or Var~1), if a formula is passed in a data frame will be accepted

z

A data frame if formulas are used in x and y and data is not piped in

tails

an integer indicating whether the test is one-tailed '1' or two-tailed '2'

Value

A list of output for reporting $analysis_type, $results, $descriptive_statistics

Examples

1
2
3
4
pst_results <- pst_data %>% pst(~scones,~tea)
pst_results <- pst(pst_data$black_tea, pst_data$green_tea, tails = 1)
pst_results <- pst(pst_data$black_tea, pst_data$green_tea, tails = 2)
pst_results <- pst(scones ~ tea, pst_data_tall, tails = 1)

ECO230/eco230r documentation built on May 12, 2020, 2:10 a.m.