I would like to fit/draw an exponential function but it does not work. For
before_database.frame<- read.table("APD_data.txt",
header = TRUE,
sep = "",
dec="."
)
Single_APD.frame<- before_database.frame[before_database.frame$Serial_number==912009913, ]
# fit<- lm(Voltage ~ poly(Amplification,2), data=Single_APD.frame)
fit<- lm(Voltage ~ exp(Amplification), data=Single_APD.frame)
I receive:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'x'
But " ~ poly(Amplification, 2)" works. What is wrong? I already searched for the error but the solutions do not work for me. Thank you!