Thanks for the help. After looking over the answers, I've come up
with some revised code:
# To simply test if an argument was passed in, missing() can be used
# However, if arg defined later, missing() will return TRUE instead of false
a=1 #put a in global environment
tst <- function(a,b=1) {
if
I'm trying to test for the existence of an object within a function,
but despite searching the help files and R-list, I can't figure out
how to do it.
Here is some test code:
#-
a=1 #now I have a in the global environment
tst <- function(a,b=1) {
# but a is not in the loc
2 matches
Mail list logo