objip
loop through all attached directories looking for pattern, possibly restricting to specified class or mode.
Loop objects()
through all attached directories
(items in the search()
list) looking for a regular expression pattern.
- Keywords
- utilities
Usage
objip(pattern, where = search(), all.names=FALSE, mode="any", class,
ls.function=if (mode != "any" || !missing(class)) "ls.str" else "ls")
Arguments
- pattern
Character string containing a regular expression that is used to list only a subset of the objects. Only names matching 'pattern' are returned.
- where
an object defining a database in the search list.
- all.names
In R, a logical that is passed to the
ls
function. If 'TRUE', all object names are returned. If 'FALSE', names which begin with a '.' are omitted.- mode, class
See
ls.str
andmode
for storage mode of an object. Seeclass
for object classes.- ls.function
Either
ls
orls.str
. If eithermode
orclass
is specified then the default isls.str
. If neither is specified then the default isls
.
Value
A list of 0 or more character vectors. Each character vector has the
name of one of the items in the search()
list. Each character
vector contains the names of the objects in the specified environment
which match the pattern
. If there are no matching names in an
environment, then the corresponding character vector is removed from the
result.
See Also
ls
,
Examples
# NOT RUN {
objip("qq")
objip("^qq")
objip("qq$")
# }
# NOT RUN {
## R only
objip("rowSums", all.names=TRUE)
## list all objects in the second and third attached packages
search()
objip()[2:3]
# }