Learn R Programming

colleyRstats (version 0.0.1)

reportMeanAndSD: Report the mean and standard deviation of a dependent variable for all levels of an independent variable rounded to the 2nd digit.

Description

#' To easily copy and paste the results to your manuscript, the following commands must be defined in Latex: \newcommand{\m}{\textit{M=}} \newcommand{\sd}{\textit{SD=}}

Usage

reportMeanAndSD(data, iv = "testiv", dv = "testdv")

Value

Mean and SD values

Arguments

data

the data frame

iv

the independent variable

dv

the dependent variable

Examples

Run this code
# \donttest{

example_data <- data.frame(Condition = rep(c("A", "B", "C"),
each = 10), TLX1 = stats::rnorm(30))

reportMeanAndSD(example_data, iv = "Condition", dv = "TLX1")
# }

Run the code above in your browser using DataLab