I can use lm or class::knn to view the source code, but I failed to show the code for princomp. Was this function(or something else) written in R or some other bytecode used.
I also could not find the source code using advises from How do I show the source code of an S4 function in a package?. Thanks for any help.
> princomp
function (x, ...)
UseMethod("princomp")
<bytecode: 0x9490010>
<environment: namespace:stats>
You have to ask using the corresponding method used by the function. Try this:
The code you are looking for is:
I think this what you were asking for.