Skip to content
Back to formatted view

Raw Message

Message-ID: <20041210215339.7EB2B39B1@mprdmxin.myway.com>
Date: 2004-12-10T22:53:53Z
From: Gabor Grothendieck
Subject: portfolio.optim, where is the source code

> 
From:   Omar Lakkis <abu3ammar@gmail.com>
>  
> How do I see the code (actual implemetation) of the function
> portfolio.optim() in tseries?
> 
> When I type the function's name on teh command line I get:
> > portfolio.optim 
> function (x, ...) 
> UseMethod("portfolio.optim")

The UseMethod call has the effect of calling
portfolio.optim.foo for the appropriate class foo.
To find the possible portfolio.optim.foo's issue
this R command:

	methods(portfolio.optim)

> I was unable to find the source in my installation. 
> 
> /usr/local/lib/R/site-library$ find tseries/ | grep op
> tseries/help/portfolio.optim
> tseries/html/portfolio.optim.html
> tseries/latex/portfolio.optim.tex
> tseries/R-ex/portfolio.optim.R

Assuming you downloaded the source package, and not just
the binary package then the R files are all in tseries/R and 
grepping through that we find that finance.R contains it.