Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# 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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions