checkValueType: Check if the specified 'valueType' parameter can be passed to...

Description Usage Arguments Value Author(s)

View source: R/plots-utility-checkValueType.R

Description

If this parameter is set to 'total' and the sum of the counts of the the children nodes is not bigger than the parent node, an empty plot is created. In this case, this function set this parameter to: 'relative'.

Usage

1
checkValueType(data, vars, valueVar, valueType = "total", labelVars = NULL)

Arguments

data

Data.frame with data.

vars

Character vector with variables of data containing plot nodes. If multiple, they should be specified in hierarchical order (from parent to child node).

valueVar

String with numeric variable of data containing node value, and associated label.

valueType

String with type of values in valueVar (branchvalues of the plot_ly) function), among others: 'total' (default, only if sum(child) <= to parent) or 'relative'.

labelVars

Named character vector containing variable labels.

Value

If the condition is fullfilled: updated valueType and warning; otherwise input valueType.

Author(s)

Laure Cougnaud


clinDataReview documentation built on July 14, 2021, 5:08 p.m.