Message-ID: <5985C9FC-3FAB-4977-9A74-F8BDE33A697A@comcast.net>
Date: 2014-11-03T04:34:28Z
From: David Winsemius
Subject: treating missing values in timeSeries package
In-Reply-To: <CAEezrQT4L1UNnHNbs+RoMrio4tVOF54cjg7WS59FDUJSD0tPRQ@mail.gmail.com>
On Nov 1, 2014, at 2:58 AM, Upananda Pani wrote:
> Dear All,
>
> I am getting the following error when i am using interpNA function from
> timeSeries package
>
> # Missing Value Treatment (Linear Interpolation)
>> spt = interpNA(spt, method = c("linear"))
> Error in interpNA(spt, method = c("linear")) : spt is not a tis object
It puzzles me why you have not investigated an error message that seems quite informative. When I looked at the code of timeSeries::interpNA I was puzzled that the package seems to use "timeSeries" as the class name. This error reports a different class name, but it does seem that the function is designed to take only a particular set of intputs and yours fails that test.
>> fut = interpNA(fut, method = c("linear"))
> Error in interpNA(fut, method = c("linear")) : fut is not a tis object
>> spt = ts(spt, start=c(2006,4), frequency=305)
>> fut = ts(fut, start=c(2006,4), frequency=305)
>> spt = interpNA(spt, method = c("linear"))
So the lack of an error here suggests that a ts-object might be acceptable to the same function that you were asking about.
--
David.
>
> Would you please help me in this regard.
>
> With sincere regards,
> Upananda
>
> --
>
>
> You may delay, but time will not.
>
>
> Research Scholar
> alternative mail id: upani at iitkgp.ac.in
> Department of HSS, IIT KGP
> KGP
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
David Winsemius
Alameda, CA, USA