View source: R/getCorrelationsByKey.R
getCorrelationsByKey | R Documentation |
Calculate correlations between key var and all other keys in a dataset
getCorrelationsByKey(
.data,
id,
key,
response,
comparisonLabel,
type = c("pearson", "spearman"),
adjustmentMethod = "none"
)
.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 |
dataframe containing resulting p.values for each key/group stat test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.