# This file is automatically generated, you probably don't want to edit this
icccoeffOptions <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
"icccoeffOptions",
inherit = jmvcore::Options,
public = list(
initialize = function(
vars = NULL, ...) {
super$initialize(
package="ClinicoPath",
name="icccoeff",
requiresData=TRUE,
...)
private$..vars <- jmvcore::OptionVariables$new(
"vars",
vars)
self$.addOption(private$..vars)
}),
active = list(
vars = function() private$..vars$value),
private = list(
..vars = NA)
)
icccoeffResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
"icccoeffResults",
inherit = jmvcore::Group,
active = list(
text = function() private$.items[["text"]]),
private = list(),
public=list(
initialize=function(options) {
super$initialize(
options=options,
name="",
title="ICC coefficients",
refs=list(
"ClinicoPathJamoviModule"))
self$add(jmvcore::Preformatted$new(
options=options,
name="text",
title="ICC coefficients"))}))
icccoeffBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
"icccoeffBase",
inherit = jmvcore::Analysis,
public = list(
initialize = function(options, data=NULL, datasetId="", analysisId="", revision=0) {
super$initialize(
package = "ClinicoPath",
name = "icccoeff",
version = c(1,0,0),
options = options,
results = icccoeffResults$new(options=options),
data = data,
datasetId = datasetId,
analysisId = analysisId,
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE,
weightsSupport = 'auto')
}))
#' ICC coefficients
#'
#' Function for Interclass Correlation Coefficient Calculation.
#'
#' @examples
#' \donttest{
#' # example will be added
#'}
#' @param data The data as a data frame.
#' @param vars .
#' @return A results object containing:
#' \tabular{llllll}{
#' \code{results$text} \tab \tab \tab \tab \tab a preformatted \cr
#' }
#'
#' @export
icccoeff <- function(
data,
vars) {
if ( ! requireNamespace("jmvcore", quietly=TRUE))
stop("icccoeff requires jmvcore to be installed (restart may be required)")
if ( ! missing(vars)) vars <- jmvcore::resolveQuo(jmvcore::enquo(vars))
if (missing(data))
data <- jmvcore::marshalData(
parent.frame(),
`if`( ! missing(vars), vars, NULL))
options <- icccoeffOptions$new(
vars = vars)
analysis <- icccoeffClass$new(
options = options,
data = data)
analysis$run()
analysis$results
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.