tableC: Correlation Table

Description Usage Arguments See Also

View source: R/table_cor.R

Description

Correlations printed in a nicely formatted table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
tableC(
  .data,
  ...,
  cor_type = "pearson",
  na.rm = FALSE,
  rounding = 3,
  output = "text",
  booktabs = TRUE,
  caption = NULL,
  align = NULL,
  float = "htb"
)

Arguments

.data

the data frame containing the variables

...

the unquoted variable names to be included in the correlations

cor_type

the correlation type; default is "pearson", other option is "spearman"

na.rm

logical (default is FALSE); if set to TRUE, the correlations use the "complete.obs" methods option from stats::cor()

rounding

the value passed to round for the output of both the correlation and p-value; default is 3

output

how the table is output; can be "text" for regular console output, "latex2" for specialized latex output, or any of kable()'s options from knitr (e.g., "latex", "markdown", "pandoc").

booktabs

when output != "text"; option is passed to knitr::kable

caption

when output != "text"; option is passed to knitr::kable

align

when output != "text"; option is passed to knitr::kable

float

when output == "latex2" it controls the floating parameter (h, t, b, H)

See Also

stats::cor


furniture documentation built on Feb. 22, 2021, 9:08 a.m.