Learn R Programming

tidystats (version 0.3)

report: Report function

Description

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

Usage

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

Run this code
# NOT RUN {
# 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")

# }

Run the code above in your browser using DataLab