Answered step by step
Verified Expert Solution
Link Copied!

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 44 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
suppressPackageStartupMessages(library(tidyverse))
# Load the dataset
rankings <- read.csv('rankings_example.csv')
# Keep only certain features
rankings <- rankings |> select(city, pollution, obesity_levels)
# Drop rows with missing values
rankingsClean <- # Your code goes here
nrow(rankingsClean)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

=+ For what reasons can and do unions go on strike?

Answered: 1 week ago

Question

=+ Is secondary industrial action common and/or legal?

Answered: 1 week ago