I had a look at the source code, and your prediction is right. There is line at
the beginning of the naiveBayes function :
Yname <- deparse(substitute(y))
When I manually edited it to list(quote(y)), it works.
__
R-devel@r-project.org mailing list
On 12 Jun 2014, at 09:00 , Dario Strbenac wrote:
> Hello,
>
> The e1071 function naiveBayes gives an error when called by do.call, although
> it doesn't give any error if I call it manually.
>
> Browse[1]> trainParams@classifier
> function (x, ...)
> UseMethod("naiveBayes")
>
> Browse[1]> t
Hello,
The e1071 function naiveBayes gives an error when called by do.call, although
it doesn't give any error if I call it manually.
Browse[1]> trainParams@classifier
function (x, ...)
UseMethod("naiveBayes")
Browse[1]> trained <- do.call(trainParams@classifier, paramList)
Error in names(dimn