Help with the ts function

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with the ts function

Nelson, Gary (MISC)
I have a time series of temperature data recorded every 2 hours and I
would like to generate a spectrogram using the spectrum function that
examines cycles per day.  My statement for coding the series using the
ts function is

bevtemp<-ts(bevtemp,deltat=0.0833334)

where 0.0833334 is 2 hours/24 hours.

I am wondering if this is the correct way to code the data?


Thanks for your help.

Gary Nelson.



************************************************************************
*
Gary A. Nelson
Massachusetts Division of Marine Fisheries
30 Emerson Avenue
Gloucester, MA 01930
Phone: (978) 282-0308 x114
Fax: (617) 727-3337
Email: [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Help with the ts function

Spencer Graves
          What are you asking?  If you want to learn about times series in R, I
suggest the following:

          1.  Ch. 14 in Venables and Ripley (2002) Modern Applied Statistics
with S, 4th ed. (Springer).  This may or may not answer your specific
question.

          2.  The article on "Date and Time Classes in R" by Gabor Grothendieck
and Thomas Petzoldt (2004) in R News, 4-1: 29-32 (dowloadable from
http://CRAN.R-project.org/doc/Rnews/).

          3.  The "zoo" vignette in the "zoo" package.  A vignette provides
both an Adobe Acrobat PDF document and a companion *.R file, which you
can work through line by line, testing modifications, etc., as you go.
This is my preferred way to learn about new capabilities in R.  If you
are not familiar with vignettes, see
"http://finzi.psych.upenn.edu/R/Rhelp02a/archive/67006.html".

          hope this helps.
          spencer graves
p.s.  I believe you will increase your average rate of knowledge
acquisition about R if you read and follow the posting guide!
"www.R-project.org/posting-guide.html".

Nelson, Gary (FWE) wrote:

> I have a time series of temperature data recorded every 2 hours and I
> would like to generate a spectrogram using the spectrum function that
> examines cycles per day.  My statement for coding the series using the
> ts function is
>
> bevtemp<-ts(bevtemp,deltat=0.0833334)
>
> where 0.0833334 is 2 hours/24 hours.
>
> I am wondering if this is the correct way to code the data?
>
>
> Thanks for your help.
>
> Gary Nelson.
>
>
>
> ************************************************************************
> *
> Gary A. Nelson
> Massachusetts Division of Marine Fisheries
> 30 Emerson Avenue
> Gloucester, MA 01930
> Phone: (978) 282-0308 x114
> Fax: (617) 727-3337
> Email: [hidden email]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html