How do I view source code in R? For example, for function portfolio.optim
> require(tseries)
> portfolio.optim
function (x, ...)
UseMethod("portfolio.optim")
<environment: namespace:tseries>
> methods(portfolio.optim)
[1] portfolio.optim.default* portfolio.optim.ts*
Non-visible functions are asterisked
> portfolio.optim.ts
Error: object 'portfolio.optim.ts' not found
> portfolio.optim.default
Error: object 'portfolio.optim.default' not found
When I install R package locally, does it download source code as well? Where does it store on the computer? Does anyone know?