corstars: Correlation table with stars

Description Usage Arguments Value Examples

View source: R/corstars.R

Description

Annotate table of correlation coefficients with the stars corresponding to the level of significance. A commonplace notation is use for annotation; For, - p < .0001: "****" - p < .001: "***" - p < .01, "**", and - p < .05, "*"

Usage

1
2
3
4
5
6
7
8
corstars(
  x,
  align,
  caption,
  method = c("pearson", "spearman"),
  removeTriangle = c("upper", "lower"),
  result = c("none", "html", "latex")
)

Arguments

x

A matrix (or all numeric dataframe) containing the data.

align

A character vector of alignment values as is specified in 'xtable(x, align)'.

caption

A character vector to be used as caption for the correlation table.

method

A character indicating method for obtaining correlation coefficient. Values can be either "pearson" or "spearman".

removeTriangle

A character vector indicating which part of the table to remove. "upper" or "lower" triangle.

result

A character indicating table output format. "html" or "latex" or "none" for plain markdown table.

Value

A dataframe

Examples

1
2
3
4
5
## Not run: 
# require(tidyverse)
corstars(mtcars 

## End(Not run)

DeependraD/expdean documentation built on Nov. 25, 2019, 12:33 a.m.