135k views
3 votes
(a) Begin by loading a new dataset (Tempdata.RData) into R. This dataset shows the average temperature of Los Angeles for the month of October from 1944 to 2015. What is the range over the average temperature in October: What year has the highest average temperature

User JsWizard
by
7.1k points

1 Answer

3 votes

Answer:

load("tempdata.RData")

range(tempdata$temp)

## [1] 61.6 74.0

max(tempdata$year)

## [1] 2015

max(tempdata$temp)

## [1] 74

min(tempdata$temp)

## [1] 61.6

plot(tempdata$year, tempdata$temp, xlab = "Recorded Years of October", ylab = "Recorded Average Temperatures in Fahrenheit", main = "Average Recorded Temperature of October in Los Angeles")

model3 <- lm(tempdata$temp ~ tempdata$year, data = tempdata)

abline(model3, col = "red", lw = 3)

Step-by-step explanation:

(a) Begin by loading a new dataset (Tempdata.RData) into R. This dataset shows the-example-1
User Rushi Daxini
by
7.0k points