Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The hmeq _ small dataset contains information on 5 9 6 0 home equity loans, including 7 features on the characteristics of the loan. Load

The hmeq_small dataset contains information on 5960 home equity loans, including 7 features on the characteristics of the loan.
Load the data set hmeq_small.csv as a data frame.
Create a new data frame with all the rows with missing data deleted.
Create a second data frame with the missing data in columns CLNO and YOJ filled in with the mean value of the column.
Print the summaries of the two new data frames.
Ex: Using only the first hundred rows, found in hmeq_sample.csv, the output is:
suppressPackageStartupMessages(library(tidyverse))
# Read in hmeq_small.csv
hmeq <- # Your code here
hmeq$CLNO <- as.numeric(hmeq$CLNO)
# Create a new data frame with the rows with missing values dropped
hmeqDelete <- # Your code here
# Create a new data frame with the missing values of CLNO and YOJ filled in by the mean of the column
meanCLNO = mean(hmeq$CLNO, na.rm=TRUE)
meanYOJ = mean(hmeq$YOJ, na.rm=TRUE)
hmeqReplace <- # Your code here
#Print the summary for each new data frame
print("Summary of hmeqDelete is ")
summary(hmeqDelete)
print("Summary of hmeqReplace is ")
summary(hmeqReplace)

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions