Answered You can hire a professional tutor to get the answer.

QUESTION

R programming: ## Q4. Dotcharts(dotplots).

R programming:

## Q4. Dotcharts(dotplots).(15pts)

# Load the USArrests data from R environment, read the documentation from the help manual.

# First add a new column to the data called safetyLevel, by converting the continuous variable Murder

# to a categorical (factor) one. The threshold for each level is (0,5] (5,10] (10,15] (15,20].

# Hint: you can do it by subsetting according to each condition, or with cut(), or with the ifelse() function.

# Then add another column named color, indicating the color for that observation. Choose a color that

# would make the data stand out (from whatever background color you choose), and use (that same color but) 

# darker shades according to the four levels of safetyLevel, indicating higher number of murder arrests.

# Plot of sorted murder arrests values with State names on y axis, grouped by safetyLevel.

# your graph should be on horizontal scale with grid.

# Explain what you see from plot in the context of the data set.

# Propose at least two methods to improve this plot, it could be another graph type, or adding new 

# graphical elements (different from the ones above) to help identify the trend or facilitate comparison.

# Explain why the methods make sense and show your code.

# bubble chart; using y axis on both sides.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question