Hi All ,
I am beginner in coding and in R programming.
I want to implement the Baxter-King filter from the Package ‘mFilter’ on Eur/Usd data .
Here is my code:
library('mFilter')
a = scan("C://EURUSD60_CLOSE");
plot(a, type='l')
a.bw <- bkfilter(a, pl=2, pu=4, nfix=1,type="fixed")
a.trend <-a.bw$trend
lines(a.trend,col="blue")
I am getting the following error messages;
> plot(a, type='l')
Error in plot(a, type = "l") : object 'a' not found
what should I replace the object ''a'' with ?What is exactly ''a'' for?
The second error message is
> a = scan("C://EURUSD60_CLOSE.txt");
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") :
cannot open file 'C://EURUSD60_CLOSE.txt': No such file or directory
I extracted the EURUSD60_CLOSE.txt file into the c//
when I check the file from the c// the file is there.But when I check the file from Session/Set working directory/Choose directory the file from the c// the file is not there.
Thank you.