report: Report function

Description Usage Arguments Details Examples

View source: R/report.R

Description

report is a general function that returns Markdown code of a statistical test in 6th edition APA style.

Usage

1
2
3
report(identifier, term = NULL, term_nr = NULL, var = NULL,
  group = NULL, statistic = NULL,
  results = getOption("tidystats_list"))

Arguments

identifier

A character string identifying the model.

term

A character string indicating which term you want to report the statistics of.

term_nr

A number indicating which term you want to report the the statistics of.

var

A character string identifying the variable.

group

A character string identifying the group.

statistic

A character string of a statistic you want to extract from a model.

results

A tidy stats list.

Details

report calls a specific report function dependent on the type of statistical test that is supplied. The 'method' column of the statistical test is used to determine which report function to run.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Read in a list of results
results <- read_stats(system.file("results.csv", package = "tidystats"))

# Set the list as the default list
options(tidystats_list = results)

# Example: t-test
report("t_test_one_sample")
report("t_test_welch")

# Example: correlation
report("correlation_pearson")
report("correlation_spearman")

# Example: ANOVA
report("aov_two_way", term = "condition")
report("aov_two_way", term = "sex")

# Example: Linear models
report("lm_simple", term = "conditionmortality salience")
report("lm_simple", term_nr = 2)
report("lm_simple", group = "model")

WillemSleegers/tidystats-v0.3 documentation built on Aug. 12, 2019, 5:31 p.m.