getStatTestByKeyGroup: Calculate statistical test between 2 groups for each key...

View source: R/GetStatTestByKeyGroup.R

getStatTestByKeyGroupR Documentation

Calculate statistical test between 2 groups for each key value in a dataframe

Description

Calculate statistical test between 2 groups for each key value in a dataframe

Usage

getStatTestByKeyGroup(
  .data,
  id,
  key,
  response,
  independentVariable,
  baselineLabel,
  testMethod,
  ...
)

Arguments

.data

A dataframe

id

A string or numeric column - represents a unique observation within each key/group combination. PersonId, LabId, etc

key

A string or numeric column - key value for dataframe. Statistics will be computed between groups for each key value

response

A numeric column - numerical value to use with statitical test between groups.

independentVariable

A string column indicating group membership - should be binary.

baselineLabel

independentVariable label used for fold change comparison / calculation

testMethod

a string - indicating which statisical test to perform. One of either ks.test, t.test, or wilcox.test

...

dots - accomodate additional arguments function is called as parent router

Value

dataframe containing resulting p.values for each key/group stat test


cusom/CUSOM.ShinyHelpers documentation built on Oct. 23, 2023, 6:50 a.m.