[R] Determining frequency and period of a wave
Greg Snow
538280 at gmail.com
Sat Jun 2 22:17:53 CEST 2012
You could use the 'nls' function to fit a sine (or cosine) function to
the data.
On Fri, Jun 1, 2012 at 7:54 PM, Aaron Patterson
<tenderlove at ruby-lang.org> wrote:
> Hello! I'm collecting data on a refrigerator that I'm using to cure
> meat. Specifically I am collection humidity and temperature readings.
> The temperature readings look sinusoidal (due to the refrigerator
> turning on and off).
>
> I'd like to calculate the frequency and period of the wave so that I can
> determine if modifications I make to the equipment are increasing or
> decreasing efficiency. Unfortunately, I'm pretty new to R, so I'm not
> sure how to figure this out. I *suspect* I should be doing an fft on
> the temperature data, but I'm not sure where to go from there.
>
> Here is a graph I'm producing:
>
> http://i.imgur.com/WpsDi.png
>
> Here is the program I have so far:
>
> https://github.com/tenderlove/rsausage/blob/master/graphing.r
>
> I have posted a repository with a SQLite database that has the data I've
> collected here:
>
> https://github.com/tenderlove/rsausage
>
> Any help would be greatly appreciated!
>
> --
> Aaron Patterson
> http://tenderlovemaking.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.
>
--
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com
More information about the R-help
mailing list