Hello to R language Professionals.
I am new to this language. a part of my paper needs this language. i wanted to run Hamilton Filter but softwares ignore to run the codes and stress on changing the data type to xts one!
actually i calculated my data on Excel for a panel of 25 countries and saved on my drive as a csv file.
time period for each country is: 1960 to 2018.
how should i treat with this code below:
df <- read.csv("E:/PhD Essay/Papers from my essay/Mofid/codes/Business cycle filter/Hamilton Filter/R Code/RGDP.csv", header=TRUE, sep=",")
RGDP <- 100*log(xts::to.quarterly(df1["1960/2018-6"], OHLC = FALSE))
the error is below:
[.data.frame(df, "1960/2018-6") : undefined columns selected
please help me to fix the problem