apa | R Documentation |
Format decimals and leading zeroes. Adapted from the MOTE package.
apa(value, decimals = 3, leading = TRUE)
value |
A set of numeric values, either a single number, vector, or set of columns. |
decimals |
The number of decimal points desired in the output. |
leading |
Logical value: |
Formats decimals and leading zeroes for creating reports in scientific style, to be consistent with American Psychological Association (APA) format. This function creates "pretty" character vectors from numeric variables for printing as part of a report. The value can take a single number, matrix, vector, or multiple columns from a data frame, as long as they are numeric. The values will be coerced into numeric if they are characters or logical values, but this process may result in an error if values are truly alphabetical.
Value(s) in the format specified, with the number of decimals places indicated and with or without a leading zero, as indicated.
https://github.com/doomlab/MOTE
Other formatting:
pValue()
,
specify_decimal()
,
suppressLeadingZero()
apa(value = 0.54674, decimals = 3, leading = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.