문제

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?

도움이 되었습니까?

해결책

I think the error message is pretty obvious:

knnreg only implemented for formula objects

Use getAnywhere(knnreg.formula) to see the source code.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top