What functions do you use in R to fit a curve to your data and test how well that curve fits? What results are considered good?
Just the first part of that question can fill entire books. Just some quick choices:
lm()
for standard linear modelsglm()
for generalised linear models (eg for logistic regression)rlm()
from package MASS for robust linear modelslmrob()
from package robustbase for robust linear modelsloess()
for non-linear / non-parametric modelsThen there are domain-specific models as e.g. time series, micro-econometrics, mixed-effects and much more. Several of the Task Views as e.g. Econometrics discuss this in more detail. As for goodness of fit, that is also something one can spend easily an entire book discussing.