Question: # Question 4: Create a new column called newCol, which is full of NA values. If both values in the first two columns (i.e., Ozone

# Question 4: Create a new column called "newCol," which is full of NA values. If both values in the first two columns (i.e., Ozone and Solar.R) of the df dataset in each row are less than the average of the respective columns, put Low in the new column, if they are the same as the averages, put "Average," and if both values are greater than averages, put high in the new column (use the pipe operator). Hint: You will need to replace the missing values on the Ozone column with the mean of the column.

Results:

```{r Question 4} #Replace missing values in Solar.R df %>% mutate(Ozone = ifelse(is.na(Ozone), median(Ozone, na.rm = TRUE), Ozone)) #Create newCol

```

# Question 5: Rename the column "newCol" to "Air_Rate". Find a pair of variables with the highest and lowest correlation in df, and assign it to the variables highest_cor and lowest_cor.

Results????

I got #4 I need help with #5 please !

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!