Dear Joshua SirHere is my data and my code:
R Version 3.4.2
1. Data:File:data.csvMonthly returns of 210 assets from April 2006 till March
zoolibrary(zoo)#Creating a zoo objectdat1.z<-read.zoo(dat1, header = TRUE, FUN
=function(x) as.yearmon(format(x, nsmall = 2),"%b-%y"))#Subseting
Problem:The last command gives the following output:
Error in dimnames(cd) <- list(as.character(index(x)), colnames(x)) :
'dimnames' applied to non-array
Kindly advise how to resolve it.
Regards,Pankaj K Agarwal
On Monday, 12 March, 2018, 6:30:27 PM IST, Joshua Ulrich
It would be easier for others to help you if you provided a
reproducible example. Here are some tips on how to create one:
Also, please follow the posting guide and send plain text emails, not
HTML. The latter are likely to be mangled by the list server, which
makes them hard to read (and is another impediment to someone trying
On Mon, Mar 12, 2018 at 7:52 AM, Pankaj K Agarwal via R-SIG-Finance
> Dear all,I am using a dataset of monthly asset returns. I subset it with
> window() call of package zoo. When i try to compute Modified VaR on this
> subset, i am getting the following error:
> Error in dimnames(cd) <- list(as.character(index(x)), colnames(x)) :
> 'dimnames' applied to non-array
> Can someone help? I googled it a lot but still nothing seems to be working.
> Pankaj K Agarwal
> [[alternative HTML version deleted]]
> R-SIG-Finance@r-project.org mailing list
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
R/Finance 2018 | www.rinfinance.com
[[alternative HTML version deleted]]
R-SIG-Finance@r-project.org mailing list
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should