I'm interested in fitting a line to some data. There is a built-in function in R lm() that gives me both the best-fit slope and intercept, however, I would like to determine the best fit intercept GIVEN a specified value of the slope. Is there an easy way to do this?(adsbygoogle = window.adsbygoogle || []).push({});

I apologize if this is in the wrong forum. I know it's not exactly "programming" but I don't know a more appropriate place to post this.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Linear regression in R

**Physics Forums | Science Articles, Homework Help, Discussion**