Question
R problem opiod
R problem
opiod <- read.csv("https://data.ct.gov/api/views/rybz-nyjw/rows.csv?accessType=DOWNLOAD", stringsAsFactors = FALSE)
You will now get back to working with the data frame object opiod.
Display the unique counties for the variable Death.County. You should observe that three counties do not make sense. One is , another is USA, and another is " FAIRFIELD" as opposed to FAIRFIELD, note the extra space. You will correct each of these issues in 1-3.
1.Update opiod so " FAIRFIELD" is FAIRFIELD for the variable Death.County.
2.Update opiod so is NOT RECORDED for the variable Death.County.
3.Update opiod so USA is NOT RECORDED for the variable Death.County.
4.Create a barplot with the function barplot for the number of deaths from the variable Death.County. As a hint, use the table function to generate counts for each county in Death.County. If you did steps 2-4 correctly, you should have nine categories. Include the graphical parameter cex.names = 0.5 to shrink the county names so they fit in the plot window.
5.Update opiod so values for the variable Race are Unknown.
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