I am trying to view the source code of the function knnreg in caret.
> getAnywhere(knnreg.default)
A single object matching ‘knnreg.default’ was found
It was found in the following places
package:caret
registered S3 method for knnreg from namespace caret
namespace:caret
with value
function (x, ...)
{
if (!any(class(x) %in% "formula"))
stop("knnreg only implemented for formula objects")
}
<environment: namespace:caret>
What's happening? Where is the source code?