getName: Get the (short) name of the lcMethod or Model

getNameR Documentation

Get the (short) name of the lcMethod or Model

Description

Extract the full or shortened name of the given lcMethod or lcModel object. The name of the fitted lcModel is determined by its associated lcMethod name and label, unless specified otherwise.

Usage

## S4 method for signature 'lcMethod'
getName(object, ...)

## S4 method for signature 'lcMethod'
getShortName(object, ...)

## S4 method for signature 'lcModel'
getName(object)

## S4 method for signature 'lcModel'
getShortName(object)

Arguments

object

The lcMethod or lcModel object.

...

Additional arguments.

Value

A character name.

Implementation

When implementing your own lcMethod subclass, override these methods to provide full and abbreviated names.

setMethod("getName", "lcMethodExample", function(object) "example name")

setMethod("getShortName", "lcMethodExample", function(object) "EX")

Similar methods can be implemented for your lcModel subclass, however in practice this is not needed as the names are determined by default from the lcMethod object that was used to fit the lcModel object.

See Also

getLabel

Examples

method <- lcMethodLMKM(Y ~ Time)
getName(method) # "lm-kmeans"
method <- lcMethodLMKM(Y ~ Time)
getShortName(method) # "LMKM"

latrend documentation built on March 31, 2023, 5:45 p.m.