Learn R Programming

mariposa (version 0.7.3)

print.spearman_rho: Print Spearman correlation results (compact)

Description

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

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

Usage

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

Value

Invisibly returns the input object x.

Arguments

x

An object of class "spearman_rho" returned by spearman_rho.

digits

Number of decimal places to display. Default is 3.

...

Additional arguments (not used).

Examples

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

Run the code above in your browser using DataLab