I am trying to fit a segmented model in R, but got a problem with segmenting the following model: mod1<-lm (SMR~Temperature+Location,df) segmented.mod1 <- segmented(mo