[R] fitting curve to data
Nathan S. Watson-Haigh
nathan.watson-haigh at csiro.au
Mon Jan 12 03:19:07 CET 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have the following data:
> y
[1] 0.000 0.004 0.008 0.016 0.024 0.032 0.044 0.064 0.072 0.088 0.108 0.140
[13] 0.156 0.180 0.208 0.236 0.264 0.296 0.320 0.360 0.408 0.444 0.472 0.524
[25] 0.576
> x
[1] 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500
[16] 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500
I'd like to plot the points and calculate a curved line of best fit. I know I need to use nls(), but
I'm unsure how to begin....any pointers?
Cheers,
Nathan
- --
- --------------------------------------------------------
Dr. Nathan S. Watson-Haigh
OCE Post Doctoral Fellow
CSIRO Livestock Industries
Queensland Bioscience Precinct
St Lucia, QLD 4067
Australia
Tel: +61 (0)7 3214 2922
Fax: +61 (0)7 3214 2900
Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html
- --------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklqqJsACgkQ9gTv6QYzVL4gCgCgy4qShoFX/9QWgKsBqHPhLCDS
r+AAnRD3kbkImG3rVaBN6d4BP2cUmqYZ
=yVLj
-----END PGP SIGNATURE-----
More information about the R-help
mailing list