Re: [R] Help with adding 'dates' string as rownames to matrix

2013-01-25 Thread kevj1980
Thank you Petr! -- View this message in context: http://r.789695.n4.nabble.com/Help-with-adding-dates-string-as-rownames-to-matrix-tp4656611p4656617.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list ht

[R] Help with adding 'dates' string as rownames to matrix

2013-01-25 Thread kevj1980
Hi, I need help with two related issues: 1. I wish to drop repeating text "BST" from the below 'dates' string: [1] "2005-04-01 BST" "2005-04-04 BST" "2005-04-05 BST" "2005-04-06 BST" "2005-04-07 BST" "2005-04-08 BST" "2005-04-11 BST" "2005-04-12 BST" "2005-04-13 BST" "2005-04-14 BST" " 2. I the

[R] Error with Expected Shortfall function, ES.

2013-01-24 Thread kevj1980
ES function gives the below error. > ES(sim, p=.95, method=c("modified"),portfolio_method=c("component"), > weights=w1) /Error in checkData(R, method = "xts", ...) : The data cannot be converted into a time series. If you are trying to pass in names from a data object with one column, you should

Re: [R] R beginner: matrix algebra

2012-12-18 Thread kevj1980
Thanks to all for help. The filter function appears most straightforward way for this problem. Kevin -- View this message in context: http://r.789695.n4.nabble.com/R-beginner-matrix-algebra-tp4653335p4653414.html Sent from the R help mailing list archive at Nabble.com. __

[R] R beginner: matrix algebra

2012-12-17 Thread kevj1980
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://