Hello All:
How can I determing the "types" of args passed to an R function? For
example, given the following:
calculate <- function(...)
{
args <- list(...)
argName = names(args)
if (arg1 == character)
cat("arg1 is a character")
else
cat("arg1 is numeric")
if (arg2 == character)
cat("arg2 is a character")
else
cat("arg2 is a numeric")
}
value = calculate(arg1='222' arg2=333)
Programatically, how can I determine if arg1 is a character and arg2 is
numeric?
Many Thanks:
Alex
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html