Learn R Programming

mariposa (version 0.7.3)

print.pearson_cor: Print Pearson correlation results (compact)

Description

Compact print method for objects of class "pearson_cor". Shows correlation coefficient, p-value, and sample size per pair.

For the full detailed output including matrices, use summary().

Usage

# S3 method for pearson_cor
print(x, digits = 3, ...)

Value

Invisibly returns the input object x.

Arguments

x

An object of class "pearson_cor" returned by pearson_cor.

digits

Number of decimal places to display. Default is 3.

...

Additional arguments (not used).

Examples

Run this code
result <- pearson_cor(survey_data, age, life_satisfaction)
result              # compact one-line overview
summary(result)     # full correlation matrices

Run the code above in your browser using DataLab