print_correlation: Print correlation matrix

Description Usage Arguments Value See Also Examples

View source: R/print_correlation.r

Description

The function uses the correlation function from the correlation package to prepare correlation matrices. The options show and html allow to adapt the output form.

Usage

1

Arguments

data

data.frame or tibble containing the data to compute the correlation

show

value TRUE or FALSE if output should be printed to console as plain text

html

value TRUE or FALSE if output should be printed to console as html code

Value

show == TRUE & html == FALSE

The correlation matrix prints to the console as plain text

show == TRUE & html == TRUE

The correlation matrix prints to the console as html code

show == FALSE & html == FALSE

The functions returns a ctable of correlation coefficients and p-values - see correlation::correlation for further details

See Also

correlation

Examples

1
2
3
4
5
6
  data <- supportR::create_data()
  print_correlation(data = data, show = TRUE, html = FALSE)
  print_correlation(data = data, show = TRUE, html = TRUE)
  print_correlation(data = data, show = FALSE, html = TRUE)
  # html = TRUE overrules show = FALSE
  print_correlation(data = data, show = FALSE, html = FALSE)

ha-pu/supportR documentation built on Sept. 13, 2020, 5:52 p.m.