Permalink
Browse files

Resurrect TopLevel$find_all()

This function was not used in any (non-commented out) code.
Now works again. only.documented argument dropped because
the objects do not contain their own documentation anymore.
  • Loading branch information...
BrianDiggs committed Jan 14, 2013
1 parent 551fc5a commit c2e51b1cddba62f09a2773f045145c5db52b43cc
Showing with 2 additions and 5 deletions.
  1. +2 −5 R/aaa-.r
View
@@ -10,12 +10,9 @@ firstUpper <- function(s) {
}
TopLevel <- proto(expr = {
- find_all <- function(., only.documented = FALSE) {
+ find_all <- function(.) {
names <- ls(pattern=paste("^", firstUpper(.$class()), "[A-Z].+", sep=""), parent.env(TopLevel))
- objs <- structure(lapply(names, get), names=names)
-
- if (only.documented) objs <- objs[sapply(objs, function(x) get("doc", x))]
- objs
+ structure(lapply(names, get, pos=parent.env(TopLevel)), names=names)
}
find <- function(., name) {
fullname <- paste(firstUpper(.$class()), firstUpper(name), sep="")

0 comments on commit c2e51b1

Please sign in to comment.