Question
1. Before proceeding with this assignment, make a backup of your existing R data objects using by using save.image() command. Make sure that the file
1. Before proceeding with this assignment, make a backup of your existing R data objects using by using save.image() command. Make sure that the file is safely stored.
2. The Github data repository stopped providing entire information about counties in a single data-set but the data is split year-wise. I combined these data in a single R object named county.RData. Load this data object in R and replace your previous county object with this. Delete lines that are not for the 50 main states and DC.
3. Most real-world data suffers from missing values and most statistical analyses begin by dealing with missing-values. Identifying missing values is the first step in this analysis. R offers the mice package to conduct this analysis. Load the mice library and use md.pattern() method to identify missing values and deal with them. The objective is to rid of all missing values. In R, missing values are represented by na You may have to run md.pattern() a few times because missing values may be introduced when you create new fields/variables.
4. In county, delete all rows that do not have a distinct fips value. This can be achieved by loading dplyr and tidyr libraries and running: county <- county %>% drop_na(fips)
please help with code in r studio!
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