I have this code
dens <- read.table(\'DensPiu.csv\', header = FALSE) fl <- read.table(\'FluxPiu.csv\', header = FALSE) mydata <- data.frame(c(dens),
Your offset term has to be a variable, like x and y, not a numeric constant. So you need to create a column in your dataset with the appropriate values.
x
y
dat$o <- 283.56 lm(y ~ I(x - x0) - 1, data=dat, offset=o)