masked(where=1, meta=0, reverse=F)
where=0
means database
zero. A character string is interpreted as the name of a database on the
current search list. Names are as returned by the
search
function.
The default for
where
is the working database.
1
or
2
(or, equivalently,
"methods"
or
"help"
, respectively), check the appropriate meta-database rather
than the ordinary database.
FALSE
compare specified database to
databases behind it on the search list.
If
TRUE
compare specified database to databases
ahead of it on search list.
masked
returns a character vector of object names which are common to
both the specified database and some database behind it on the search list
(from
where + 1
to
length(search())
).
If
reverse
is
TRUE
then do the same for
the databases ahead of specified database (from
0
to
where - 1
.
This includes currently attached
directory databases and recursive S-PLUS objects.
Object modes are ignored.
When S-PLUS searches for an object (function or dataset), it examines the
current frame, the session frame, database zero, and each of the databases
on the search list, in that order. If an object of unspecified mode is
being sought, the first successful name match will terminate the search.
If the search is mode-specific, it ends when both criteria are satisfied.
Any objects with the same name (or name and mode) on later databases are
said to be masked.
A search for masked objects is useful when S-PLUS functions and datasets
do not appear to behave as they should.
Although
masked
does not call any further functions, and is therefore
not sensitive to masked functions itself, it may not be possible to print
the answer if any function involved in printing has been masked. If this
appears to be the case, try cat(masked(), "\n"), since
cat
does not
call any functions.
# mask the system function c c <- function(...) cat("My c function called.\\n") c(1,2,3) # will find the new c, not the system c masked() remove("c")