Readers, I am having difficulty understanding how to enter commands into r.
I have data arranged as: 100, 200, 300 5.6, 6.7, 7.8 8.9, 9.0, 0.1 1.2, 2.3, 3.4 The data is saved in csv format and I use the command 'read.table' to import into r. The values 5.6...3.4 are a function of values 100,...300, i.e. 100,...300 are independent variables (x). The function is a power series: y=a+bx+cx^2 How do I obtain the values of a,b,c by minimisation of the sum of squares of deviations? So far looking at the documentation 'r-intro' section 10, I tried the following: functionname<-function(a,b,c){ + a<-sum(a) + b<-sum(b) + c<-sum(c) + y<-(a+bx+cx^2) + x<-(x) + } The documentation states: "...using a call such as...". What does this mean? Yours, [EMAIL PROTECTED] gnu/linux mandriva 2008 r 251 (27-06-07) ______________________________________________ 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.