get_from | R Documentation |
A generic function, whose default method works for list
, and with specific methods for objects inheriting from classes SLik_j
and SLik
.
get_from(object, which, ...)
## S3 methods with additional argument(s)
## S3 method for class 'SLik'
get_from(object, which, raw=FALSE, force=FALSE, ...)
## S3 method for class 'SLik_j'
get_from(object, which, raw=FALSE, force=FALSE, ...)
object |
Any object with a list structure. |
which |
Character: identifier for the element to be extracted. See Examples for possible values. |
raw |
Boolean: if TRUE, |
force |
Boolean: if TRUE, the extracted element may be computed if it appears to be missing from the |
... |
further arguments passed to or from other methods (currently not used). |
Will depend on which
, but aims to retain a convenient format backward-compatible with version 1.4.0.
logLik
.
# ##### 0bserved summary statistics
# # (raw data)
# get_from(slik, "raw_data")
# # (projected data, with raw ones as attribute, if relevant)
# get_from(slik, which="obs") # or which="stat.obs" or "proj_data"
#
# ##### Reference-table information
# # (raw = unprojected):
# get_from(slik, "reftable_raw")
# # : but this is NULL if no projections were performed.
#
# # Projected:
# get_from(slik, "reftable")
# # : including all parameters, latent variables, statistics,
# # 'cumul_iter' (the iteration in which each sample was added),
# # and attributes.
#
# ##### RMSEs
# # On any summary-likelihood object 'slik':
# get_from(slik, which="par_RMSEs") # matrix
# # despite <object>$par_RMSEs being an environment if
# # 'slik' was created by version > 1.4.0, as then shown by
# get_from(slik, which="par_RMSEs", raw=TRUE)
#
# # Further, if
# get_from(slik, which="par_RMSEs")
# # returns NULL because the element is absent from the object,
# # then one can force its computation by
# get_from(slik, which="par_RMSEs", force=TRUE)
# # The result are saved in the 'slik' object, so running again
# get_from(slik, which="par_RMSEs")
# # will no longer return NULL.
#
# ##### Other, less commonly needed elements
# get_from(slik, "Simulate"")
# get_from(slik, "control.Simulate")
# get_from(slik, "env")
# get_from(slik, "packages")
# # => for these elements, the documentation and arguments of refine.default()
# # provides meaning and context where they may be used.
#
# Number of elements of the multivariate gaussian mixture model:
# get_from(slik, "nbCluster")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.