[R] how to check given number seq. is time series or not?

David Winsemius dwinsemius at comcast.net
Sat May 26 17:54:36 CEST 2012


On May 26, 2012, at 7:50 AM, R. Michael Weylandt wrote:

> Thank you for your list of numbers. Next time I run out I'll know
> where to find some.
>
> Now what exactly is your question? Any series of data can be a time
> series -- it's just a matter of interpretation.

After I stopped chuckling at Michael's response, I copied that list to  
my clipboard, clicked once on my Rconsole window, and typed:

vec <- scan()  # and hit return

I then pasted the clipboard contents to the console, watched as 100  
numeric values were passed on to 'vec' and hit enter to cause a double  
<cr> to signal to scan() to stop entry. I then typed:

plot(vec)

And one can then see that most of the numbers lie between 0 and 1.5. I  
thought I saw a "hard ceiling" at around 1.5 and looking at the data I  
wondered if the several values of 1.442... were the same:

 > vec[vec==1.4424189950435]
  [1] 1.442419 1.442419 1.442419 1.442419 1.442419 1.442419 1.442419  
1.442419 1.442419 1.442419
[11] 1.442419 1.442419 1.442419

There does seem to be a discrete process underlying this. There are  
only 32 discrete values, and here at the 10 most common:

 > rev(table(vec)[order(table(vec))] )[1:10]
vec
   1.4424189950435  1.22726162946495  1.35785109728356  
0.970883941918588 0.774234247460432
                13                11                 7                  
7                 6
  1.10704609982913   0.9670580678417 0.889046409368551  
0.822170913920467  4.91679981837699
                 5                 5                 5                  
5                 3

Four values stand out as materially different. Three of them appear to  
have hit some sort of "secondary ceiling" at a value of 5 and another  
is sitting all alone at 2.3 (roughly).

Now as Michael asked .... what WAS the question?

-- 
David.

>
> Michael
>
> On Sat, May 26, 2012 at 5:13 AM, sagarnikam123 <sagarnikam123 at gmail.com 
> > wrote:
>> i have following numbers
>>
>>         0.889046409368551
>>         1.22726162946495
>>         1.22726162946495
>>         1.35785109728356
>>         1.35785109728356
>>         1.10704609982913
>>         1.4424189950435
>>         1.2277843378837
>>         1.35785109728356
>>         0.970883941918588
>>         0.822170913920467
>>         1.35785109728356
>>         0.358815782262543
>>         0.774234247460432
>>         0.822170913920467
>>         0.822170913920467
>>         0.72599976881814
>>         0.671583894425946
>>         0.813223271443211
>>         0.774234247460432
>>         1.00184802593319
>>         1.4424189950435
>>         1.22726162946495
>>         0.970883941918588
>>         0.358815782262543
>>         1.31016840948316
>>         0.970883941918588
>>         1.4424189950435
>>         0.889046409368551
>>         4.91679981837699
>>         1.2277843378837
>>         1.21605333196293
>>         0.369861996166875
>>         0.774748148811057
>>         0.369861996166875
>>         1.4424189950435
>>         1.22726162946495
>>         1.4424189950435
>>         1.22726162946495
>>         1.16291100715022
>>         2.33863311242767
>>         0.774234247460432
>>         4.91679981837699
>>         0.9670580678417
>>         0.970883941918588
>>         0.9670580678417
>>         1.10704609982913
>>         4.91679981837699
>>         1.4424189950435
>>         1.05410985855726
>>         1.22726162946495
>>         1.21605333196293
>>         1.35785109728356
>>         0.822170913920467
>>         1.4424189950435
>>         0.970883941918588
>>         0.835429195630044
>>         0.774234247460432
>>         1.61328986496929
>>         0.970883941918588
>>         1.2277843378837
>>         1.22726162946495
>>         0.970883941918588
>>         1.10704609982913
>>         1.10704609982913
>>         1.10704609982913
>>         1.4424189950435
>>         1.22726162946495
>>         1.4424189950435
>>         1.35785109728356
>>         0.9670580678417
>>         0.9670580678417
>>         0.885419165744907
>>         1.16291100715022
>>         0.369861996166875
>>         0.9670580678417
>>         0.774748148811057
>>         1.22726162946495
>>         1.4424189950435
>>         1.22726162946495
>>         1.31016840948316
>>         0.813223271443211
>>         1.4424189950435
>>         0.822170913920467
>>         1.05410985855726
>>         0.853014111520372
>>         1.3245534157835
>>         0.774234247460432
>>         0.774234247460432
>>         1.22726162946495
>>         0.889046409368551
>>         1.4424189950435
>>         0.842622628771215
>>         0.889046409368551
>>         0.889046409368551
>>         1.31898472833595
>>         1.4424189950435
>>         1.35785109728356
>>         0.682617341489085
>>         0.965180291004232
>>
>> i don't want to check by plotting graph of above data(because i have
>> thousands of such data structures)
>> is there any function in R to check it ?
>> how can i check validity by programming?
>>
>>
>>
>> --
>> View this message in context: http://r.789695.n4.nabble.com/how-to-check-given-number-seq-is-time-series-or-not-tp4631434.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> 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.
>
> ______________________________________________
> 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.



More information about the R-help mailing list