Question: R Coding - Instructions - The hmeq _ small dataset contains information on 5 9 6 0 home equity loans, including 7 features on the
R Coding Instructions
The hmeqsmall dataset contains information on home equity loans, including features on the characteristics of the loan.
Load the hmeqsmall.csv data set as a data frame.
Create a new data frame with the columns LOAN and VALUE
standardized and saved as LOANSTAND and VALUESTAND.
Create a second data frame with the columns LOAN and VALUE
normalized and saved as LOANNORM and VALUENORM.
Print the summaries of the new data frames.
The expected output is shown on screenshot, I cannot show them all but basically looks like that. I tried it twice, and it still shows errors! I need help.
The first error :
suppressPackageStartupMessageslibrarytidyverse
# Load the dataset
hmeq read.csvhmeqsmall.csv
# Drop rows with NAs
hmeq naomithmeq
# Standardize the columns LOAN and VALUE
hmeqStand hmeq
mutateLOANSTAND scaleLOAN VALUESTAND scaleVALUE
# Normalize the columns LOAN and VALUE
hmeqNorm hmeq
mutateLOANNORM scaleLOAN center minLOAN scale diffrangeLOAN
VALUENORM scaleVALUE center minVALUE scale diffrangeVALUE
# Print the summaries of the data frames
catSummary of standardized data:
summaryhmeqStand
cat
Summary of normalized data:
summaryhmeqNorm
The second error:
suppressPackageStartupMessageslibrarytidyverse
hmeq read.csvhmeqsmall.csv
# Drop rows with NAs
hmeq dropnahmeq
# Standardize the columns LOAN and VALUE
hmeqStand hmeqStand hmeq
mutateLOANSTAND scaleLOAN
VALUESTAND scaleVALUE
# Normalize the columns LOAN and VALUE
hmeqNorm hmeqNorm hmeq
mutateLOANNORM scaleLOAN center minLOAN scale diffrangeLOAN
VALUENORM scaleVALUE center minVALUE scale diffrangeVALUE
# Print the summaries of the data frames hmeqStand and hmeqNorm
printSummary of standardized data:"
summaryhmeqStand
printSummary of normalized data:"
summaryhmeqNorm
The R programing lines
suppressPackageStartupMessageslibrarytidyverse
hmeq # Your code here
# Drop rows with NAs
hmeq dropnahmeq
# Standardize the columns LOAN and VALUE
hmeqStand # Your code here
# Normalize the columns LOAN and VALUE
hmeqNorm # Your code here
# Print the summaries of the data frames hmeqStand and hmeqNorm
printSummary of standardized data:"
# Your code here
printSummary of normalized data:"
# Your code here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
