#' @title apa.zstat
#'
#' @description APA formating for the z statistic
#'
#' @export
#'
#' @param z z statistic to be formatted
#' @return the formatted value as a \code{\link[base]{character}}
#'
#' @author Mark Newman, \email{mark@trinetteandmark.com}
#' @keywords statistic
#' @family statistic
#'
#' @examples
#' zs = apa.zstat(1.1234)
#' zss = apa.zstat(c(1.1234, 2.0007, 0.0342))
#' # In the markdown put `r zs` or `r zss`
#'
apa.zstat = function(z) {
res = sprintf("$z$ = %s", round(z, 3))
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.