Commit ab2c75f5 authored by kfield's avatar kfield
Browse files

Add and edit report.Rmd

parent 0544beb0
Loading
Loading
Loading
Loading

Bradford/report.Rmd

0 → 100644
+18 −0
Original line number Diff line number Diff line
Below is a scatter plot with the regression line.

```{r plot, fig.height=5}
par(mar = c(4, 4, 1, 1))
plot(regFormula(), data = mtcars, pch = 19, col = 'black', alpha=0.8)
abline(fit, col = 'gray', lwd = 2)
```

Here is my regression model:

```{r model, collapse=TRUE}
options(digits = 4)
fit <- lm(regFormula(), data = mtcars)
b   <- coef(fit)
summary(fit)
```

The fitting result is $mpg = `r b[1]` + `r b[2]``r input$x`$.