inst/snippets/Example2.41b.R

Tip.Fun <- makeFun(lm(Tip ~ Bill, data = RestaurantTips)) # make a function of the linear model
Tip.Fun(Bill = 59.33) # predicted tip when bill is $59.33
Tip.Fun(Bill = 9.52)
Tip.Fun(Bill = 23.70)

Try the Lock5withR package in your browser

Any scripts or data that you put into this service are public.

Lock5withR documentation built on May 2, 2019, 3:43 p.m.