par(ask=TRUE) opar <- par(no.readonly=TRUE) # record current settings # Listing 11.1 - A scatter plot with best fit lines attach(mtcars) plot(wt, mpg, main="Basic Scatterplot of MPG vs. Weight", xlab="Car Weight (lbs/1000)", ylab=&q…
par(ask=TRUE) opar <- par(no.readonly=TRUE) # make a copy of current settings attach(mtcars) # be sure to execute this line plot(wt, mpg) abline(lm(mpg~wt)) title("Regression of MPG on Weight") # Input data for drug example dose <- c(20, 3…