Have a look to this "simple" functions :
test <- function(x,...){
UseMethod("test",x)
}
test.default<-function(x,y,data){
message("default")
print(deparse(substitute(x)))
print(deparse(substitute(y)))
print(deparse(substitute(data)))
print(match.call())
}
test.formula <- function(x,...){
message("formula")
print(deparse(substitute(x)))
print(match.call())
}
Everything is fine
data(iris)
test.formula(Sepal.Length~Petal.Width,iris)
test.default(Sepal.Length,Petal.Width,iris)
test(Sepal.Length~Petal.Width,iris)
Except this one :
test(Sepal.Length,Petal.Width,iris)
Because of NSE : object 'Sepal.Length' not found
Any idea ?