Dear All,

I am facing problem with NA treatment in my financial time series data.

# data reading

aluminum = read.csv(file="alu.csv", header=T, sep=",")

fut = aluminum [,2]
spt = aluminum [,3]


# Missing Value Treatment (Linear Interpolation)
spt = interpNA(spt, method = c("linear"))
fut = interpNA(fut, method = c("linear"))


fut=fut[,1]
spt =spt[,1]

spt = interpNA(spt, method = c("linear"))
Error in interpNA(spt, method = c("linear")) : spt is not a tis object
> fut = interpNA(fut, method = c("linear"))
Error in interpNA(fut, method = c("linear")) : fut is not a tis object

Then i want to convert my data into time series as following
# Making Time Series
fut = ts(fut, start=c(2006,4), frequency=305)
spt = ts(spt, start=c(2006,4), frequency=305)

Would you please guide me what is the problem with my code?

With best regards,
Upananda Pani
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to