Look at the functions: nls, optimize, optim.  Also look at the packages
circular and CircStats.

Hope this helps, 


-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Randy Zelick
Sent: Tuesday, December 19, 2006 12:52 PM
To: R list server posting
Subject: [R] fit sine?

Hello list,

I am making scatterplots of data that vary sinusoidally over 24 hours. 
With a bit of previous help from this list, I now can get an x-axis with
time tics from 00:00 on the left edge to 12:00 in the middle and 00:00
on the right edge, i.e., just 24 hours.

Now I would like to fit a sin function to the plot. I've looked all over
CRAN and the web in general, but have not found a method or package for
this.

Can anyone make a suggestion?

Thanks,

=Randy=


Using R 2.4.0 on Solaris (unix).


R. Zelick                               email: [EMAIL PROTECTED]
Department of Biology                   voice: 503-725-3086
Portland State University               fax:   503-725-3888

mailing:
P.O. Box 751
Portland, OR 97207

shipping:
1719 SW 10th Ave, Room 246
Portland, OR 97201

______________________________________________
[email protected] 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.

______________________________________________
[email protected] 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.

Reply via email to