getCorrelationsByKey: Calculate correlations between key var and all other keys in...

View source: R/getCorrelationsByKey.R

getCorrelationsByKeyR Documentation

Calculate correlations between key var and all other keys in a dataset

Description

Calculate correlations between key var and all other keys in a dataset

Usage

getCorrelationsByKey(
  .data,
  id,
  key,
  response,
  comparisonLabel,
  type = c("pearson", "spearman"),
  adjustmentMethod = "none"
)

Arguments

.data

A dataframe

id

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

key

A string or numeric column - key value for dataframe. Correlations will be computed between comparison key and all other key values

response

A numeric column - numerical value to use with correlations test between keys.

comparisonLabel

A string value - key label to compute all correlations against

type

a string - indicating which correlations test to perform. One of either pearson or spearman – see Hmisc::rcorr function

adjustmentMethod

- nammed method to correct p.values for multiple comparisons

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.