ls_by_class.Rd
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')#> NULL#> [1] FALSE#> [1] FALSE