formula.pdBlocked.RdThe formula attributes of the pdMat elements of
x are extracted and returned as a list, in case
asList=TRUE, or converted to a single one-sided formula when
asList=FALSE. If the pdMat elements do not have a
formula attribute, a NULL value is returned.
# S3 method for class 'pdBlocked'
formula(x, asList, ...)an object inheriting from class "pdBlocked",
representing a positive definite block diagonal matrix.
an optional logical value. If TRUE, a list with
the formulas for the individual block diagonal elements of
x is returned; else, if FALSE, a one-sided formula
combining all individual formulas is returned. Defaults to
FALSE.
some methods for this generic require additional arguments. None are used in this method.
a list of one-sided formulas, or a single one-sided formula, or
NULL.
pd1 <- pdBlocked(list(~ age, ~ Sex - 1))
formula(pd1)
#> [[1]]
#> ~age
#> <environment: 0x564baea2f770>
#>
#> [[2]]
#> ~Sex - 1
#> <environment: 0x564baea2f770>
#>
formula(pd1, asList = TRUE)
#> [[1]]
#> ~age
#> <environment: 0x564baea2f770>
#>
#> [[2]]
#> ~Sex - 1
#> <environment: 0x564baea2f770>
#>