ls_by_class | R Documentation |
get functions in the environment by their class. Useful to find e.g. all regression models you've stored in interactive programming.
ls_by_class(classes, envir = parent.frame(), top_class_only = FALSE, ...)
classes |
objects should have one of these classes |
envir |
defaults to looking in the calling environment of this function, passed to ls |
top_class_only |
defaults to FALSE. If false, also returns objects inheriting from one of the specified classes. |
... |
passed to ls |
data(ChickWeight)
chickweight.m1 <- glm(weight ~ Time + Diet, family = gaussian, data = ChickWeight)
ls_by_class('lm')
c('chickweight.m1') %in% ls_by_class('lm')
c('chickweight.m1') %in% ls_by_class('lm', top_class_only = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.