Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This dataset contains information on lifestyle measures such as the amount of sunshine, pollution, and happiness levels for 4 4 major cities around the world.
This dataset contains information on lifestyle measures such as the amount of sunshine, pollution, and happiness levels for major cities around the world.
Drop rows in rankings with missing values.
The code contains all imports, loads the dataset, subsets the dataset, and displays the number of rows in the cleaned data.
# Import packages
suppressPackageStartupMessageslibrarytidyverse
# Load the dataset
rankings read.csvrankingsexample.csv
# Keep only certain features
rankings rankings selectcity pollution, obesitylevels
# Drop rows with missing values
rankingsClean # Your code goes here
nrowrankingsClean
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started