Learn R Programming

latrend (version 1.6.1)

[[,lcMethod-method: Retrieve and evaluate a lcMethod argument by name

Description

Retrieve and evaluate a lcMethod argument by name

Usage

# S4 method for lcMethod
$(x, name)

# S4 method for lcMethod [[(x, i, eval = TRUE, envir = NULL)

Value

The argument call or evaluation result.

Arguments

x

The lcMethod object.

name

The argument name, as character.

i

Name or index of the argument to retrieve.

eval

Whether to evaluate the call argument (enabled by default).

envir

The environment in which to evaluate the argument. This argument is only applicable when eval = TRUE.

See Also

Other lcMethod functions: as.data.frame.lcMethod(), as.data.frame.lcMethods(), as.lcMethods(), as.list.lcMethod(), evaluate.lcMethod(), formula.lcMethod(), lcMethod-class, names,lcMethod-method, update.lcMethod()

Examples

Run this code
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time", nClusters = 3)
method$nClusters # 3
m = lcMethodLMKM(Y ~ Time, id = "Id", time = "Time", nClusters = 5)
m[["nClusters"]] # 5

k = 2
m = lcMethodLMKM(Y ~ Time, id = "Id", time = "Time", nClusters = k)
m[["nClusters", eval=FALSE]] # k

Run the code above in your browser using DataLab