Fit an exponential curve using nls with a custom data frame in R
问题 I have been through many questions on SO but I am not able to find a fix for my problem in related answers. I have a table like this stored as PAO1.data : Name P AO Prog1 0.654 59.702 Prog2 0.149 49.595 Prog3 0.505 50.538 Prog4 0.777 59.954 Prog5 0.237 49.611 Prog6 0.756 50.630 Prog7 0.560 118.014 Prog8 0.015 53.779 Prog9 0.789 68.096 Prog10 0.825 79.558 I tried to use nls to fit an exponential curve to the data. df = data.frame(PAO1.data) p = df$P ao = df$AO RMSE <- function(fit, act){ sqrt