Actually, ignore my comment about that link. I don't think that link is what you want to look at either.
y~x^2 fits quite well, but you could also write a loop to run lm() on a bunch of different transformations. foo=list(log,sqrt) for (bar in foo) { plot(bar(x),y) } There may be a function that does this already, but I couldn't find it either. Sorry for sending so many emails 2010/5/14 Thomas Levine <thomas.lev...@gmail.com>: > I spoke too soon; that is not linear. > > I've never used the model-fitting functions, but you may check them out. > http://developer.r-project.org/model-fitting-functions.txt > > Tom > > 2010/5/14 Thomas Levine <thomas.lev...@gmail.com>: >> x<-c(0.5,4,6,8,12) >> y<-c(0.021,0.021,0.020,0.018,0.012) >> lm(y~x) >> >> 2010/5/14 Dani Valverde <daniel.valve...@uab.cat>: >>> Hello, >>> It is a very naive question, but here it is. I have this values: >>> >>> x: 0.5 4 6 8 12 >>> >>> y: 0.021 0.021 0.020 0.018 0.012 >>> >>> I need to fit a function to them. How can I do it with R? >>> Thank you so much! >>> >>> Dani >>> >>> -- >>> Daniel Valverde Saubí >>> >>> Grup de Biologia Molecular de Llevats >>> Facultat de Veterinària de la Universitat Autònoma de Barcelona >>> Edifici V, Campus UAB >>> 08193 Cerdanyola del Vallès- SPAIN >>> >>> Tlf. +34 93 581 1910 >>> Fax: +34 93 581 1573 >>> >>> ______________________________________________ >>> R-help@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@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.