Learn R Programming

JWileymisc (version 1.4.1)

APAStyler.SEMSummary: A generic function for pretty printing in (semi) APA Style

Description

A generic function for pretty printing in (semi) APA Style

Usage

# S3 method for SEMSummary
APAStyler(
  object,
  digits = 2,
  type = c("cov", "cor", "both"),
  stars = FALSE,
  file = ifelse(.Platform$OS.type == "windows", "clipboard", FALSE),
  sep = "\t",
  print = TRUE,
  ...
)

Arguments

object

SEMSummary object

digits

The number of digits to round results to. Defaults to 2.

type

A character vector giving what to print. Defaults to ‘cov’, the covariances. Other options are ‘cor’ and ‘both’.

stars

A logical value whether to include significance values as stars (*** p < .001, ** p < .01, * p < .05).

file

An optional argument indicating whether the output should be written to a file.

sep

Character what the separator for the table should be. Defaults to tabs.

print

A logical argument, whether or not to print results to screen. This is distinct from saving them to a file. Defaults to TRUE for back compatibility.

...

Additional argiuments passed on to write.table.

Examples

Run this code
m <- SEMSummary(~., data = mtcars)
APAStyler(m, type = "cor", stars = FALSE, file = FALSE)
APAStyler(m, type = "cov", stars = FALSE, file = FALSE)
APAStyler(m, type = "both", stars = FALSE, file = FALSE)
APAStyler(m, type = "cor", stars = TRUE, file = FALSE)
APAStyler(m, type = "cov", stars = TRUE, file = FALSE)
APAStyler(m, type = "both", stars = TRUE, file = FALSE)

Run the code above in your browser using DataLab