[R] R beginner: matrix algebra
Patrick Burns
pburns at pburns.seanet.com
Tue Dec 18 10:44:22 CET 2012
Convenient ways of computing both simple
and log returns are at the very end of:
http://www.portfolioprobe.com/2012/11/05/an-easy-mistake-with-returns/
Those work whether you have a vector or
a matrix.
Pat
On 17/12/2012 17:16, kevj1980 wrote:
> Hi, I have an n x m matrix of numerical observations. ie. stock prices
>
> I wish to convert the matrix of observations to a matrix of simple returns
> (by taking the differences between (column) observations.)
>
> Can any good soul suggest a function for this?
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/R-beginner-matrix-algebra-tp4653335.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of 'Some hints for the R beginner'
and 'The R Inferno')
More information about the R-help
mailing list