I am trying to see the underlying algorithm (code) in the naive_bayes function (naivebayes package), the predict.naive_bayes function (naivebayes package) and the naiveBayes function (e1071 package). I am getting things like what is below but I cannot see the algorithm itself. naiveBayes function (x, ...) UseMethod("naiveBayes")
naive_bayes
function (x, ...)
{
UseMethod("naive_bayes")
}
<environment: namespace:naivebayes>
predict.naive_bayes
Error: object 'predict.naive_bayes' not found
> predict
function (object, ...)
UseMethod("predict")
<bytecode: 0x000000000ad686d0>
<environment: namespace:stats>
naivebayes::naive_bayes
function (x, ...)
{
UseMethod("naive_bayes")
}
<environment: namespace:naivebayes>
> naivebayes:::naive_bayes
function (x, ...)
{
UseMethod("naive_bayes")
}
<environment: namespace:naivebayes>
>
I also tried this
> download.packages(naivebayes)
Error in dir.exists(destdir) :
argument "destdir" is missing, with no default
> download.packages(naivebayes, destdir = ".",type = "source")
Error in unique(pkgs) : object 'naivebayes' not found
> download.packages(e1071, destdir = ".",type = "source")
Error in unique(pkgs) : object 'e1071' not found
>