Finding the equation for a multiple and nonlinear regression model?
This question clearly is the basics of linear regression. 

If you are looking for a way to implement linear regression in R, use the lm method.

fit &lt;- lm(y~X1+X2, data = datasetname)

summary(fit) 


This should give the coefficients and the p value for each variable.