Holger Speckter (jerebai)
16/06/2018
This is my 5 slide presentation for the week 4 project Coursera: Data Products.
Content of the project:
The Appendix contains links to the files.

# linear model function
output$predict <- renderPrint({
diamonds_sub <-
subset(
diamonds,
cut == input$cut &
color == input$color &
clarity == input$clarity
)
fit <- lm(price~carat,data=diamonds_sub)
unname(predict(fit, data.frame(carat = input$lm)))
})
Based on the selected subset and the carat value a price is predicted in the UI.
[1] 21012.92