Hi George, Please keep the R mailing list copied--I've added them back.
The example on the webpage you listed is wrong, in a way that would be obvious if you took the time to familiarize yourself with the basics of R. stocks has no names. Best, Ista On Fri, Feb 28, 2014 at 6:45 PM, George Katsuras <geoka...@hotmail.com> wrote: > http://economistatlarge.com/portfolio-theory/r-optimized-portfolio > > Thanks for your prompt response. I think the above link provides the > reproducible example you are looking for. > > > >> From: istaz...@gmail.com >> Date: Fri, 28 Feb 2014 13:16:57 -0500 >> Subject: Re: [R] New to R >> To: geoka...@hotmail.com >> CC: r-help@r-project.org > >> >> Please give a reproducible example. When I run your code I get "object >> 'stocks' not found". So what is stocks? >> >> On Thu, Feb 27, 2014 at 11:24 PM, George Katsuras <geoka...@hotmail.com> >> wrote: >> > I successfully downloaded and loaded the stockPortfolio and quadprog >> > packages, but when I entered the following command I got an error: >> > >> > >> > returns <- getReturns(names(stocks), freq="week") >> > Error in file(file, "rt") : cannot open the connection >> > In addition: Warning message: >> > In file(file, "rt") : cannot open: HTTP status was '404 Not Found' >> > >> > >> > >> > >> > When I tried discovering the source of this error, it appears that the >> > file has been temporarily moved to a new URL address. >> > >> > >> > I’m currently running Windows 8.1. >> > >> > >> > Is there a fix for this? >> > >> > >> > >> > >> > Sent from Windows Mail >> > [[alternative HTML version deleted]] >> > >> > >> > ______________________________________________ >> > R-help@r-project.org mailing list >> > https://stat.ethz.ch/mailman/listinfo/r-help >> > PLEASE do read the posting guide >> > http://www.R-project.org/posting-guide.html >> > and provide commented, minimal, self-contained, reproducible code. >> > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.