Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You should write R code anywhere you see an empty R code chunk. You should write English text anywhere you see ...; please surround it

You should write R code anywhere you see an empty R code chunk. You should write English text anywhere you see "..."; please surround it with doubled asterisks (`**...**`) so that it will show up as boldface and be easy for us to find. Include reasonable labels (titles, axis labels, legends, etc.) with each of your graphs. We'll use data on housing values in suburbs of Boston. They are in an R package called "MASS." (An R package is a collection of code, data, and documentation. "MASS" refers to the book "Modern Applied Statistics with S." R developed from the earlier language, S.) The MASS package comes with the default R installation, so it's already on your computer. However, it's not loaded into your R session by default. So we'll load it via the `require()` command (there's nothing for you to do here): ```{r} require("MASS") ``` Run `?Boston` (outside this R Markdown document) to read the help page for the `Boston` data frame.

Look into the highest-crime neighborhood by making a single graph of one column of three rows: * Find the row number, r, of the neighborhood with the highest "crim". * Make a density plot of "crim". Include a rug to show the data. * Add a red circle at (x, y) = (max crime rate, 0) to make this maximum crime rate stand out. * Make a density plot with rug of "medv", adding a red circle at (x, y) = (medv[r], 0) to see what medv corresponds to the highest crime rate. * Repeat the last step for "ptratio". ```{r} ``` What do you notice about the ptratio and medv for the highest-crime neighborhood?

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

6 Sustainable development, global change and ecosystems

Answered: 1 week ago

Question

Draw a schematic diagram of I.C. engines and name the parts.

Answered: 1 week ago