Skip to content

Instantly share code, notes, and snippets.

@johnmyleswhite
Created September 17, 2012 00:11
Show Gist options
  • Save johnmyleswhite/3734935 to your computer and use it in GitHub Desktop.
Save johnmyleswhite/3734935 to your computer and use it in GitHub Desktop.
Toy Regression
df <- data.frame(Fahrenheit = c(212, 32),
Celsius = c(100, 0))
lm.fit <- lm(Fahrenheit ~ Celsius, data = df)
summary(lm.fit)
predict(lm.fit, data.frame(Celsius = 40))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment