Extract the method arguments as a list
The lcMethod object.
Additional arguments.
A character vector of argument names to select. Only available arguments are returned.
Alternatively, a function or list of functions, whose formal arguments will be selected from the method.
Whether to evaluate the arguments.
Whether to return all method arguments when "..." is present among the requested argument names.
The environment in which to evaluate the arguments. If NULL, the environment associated with the object is used. If not available, the parent.frame() is used.
A list with the argument calls or evaluated results depending on the value for eval.
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
as.list(method)
#> $time
#> [1] "Time"
#>
#> $id
#> [1] "Id"
#>
#> $nClusters
#> [1] 2
#>
#> $center
#> function (x, ...)
#> {
#> mean(x, ..., na.rm = TRUE)
#> }
#> <bytecode: 0x563b5c33c468>
#> <environment: namespace:latrend>
#>
#> $standardize
#> function (x, center = TRUE, scale = TRUE)
#> UseMethod("scale")
#> <bytecode: 0x563b5c36d3f8>
#> <environment: namespace:base>
#>
#> $method
#> [1] "qr"
#>
#> $model
#> [1] TRUE
#>
#> $y
#> [1] FALSE
#>
#> $qr
#> [1] TRUE
#>
#> $singular.ok
#> [1] TRUE
#>
#> $contrasts
#> NULL
#>
#> $iter.max
#> [1] 10
#>
#> $nstart
#> [1] 1
#>
#> $algorithm
#> [1] "Hartigan-Wong" "Lloyd" "Forgy" "MacQueen"
#>
#> $formula
#> Y ~ Time
#> <environment: 0x563b53dff160>
#>
as.list(method, args = c("id", "time"))
#> $id
#> [1] "Id"
#>
#> $time
#> [1] "Time"
#>