EVOLUTION-MANAGER
Edit File: USArrests.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Violent Crime Rates by US State</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for USArrests {datasets}"><tr><td>USArrests {datasets}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Violent Crime Rates by US State</h2> <h3>Description</h3> <p>This data set contains statistics, in arrests per 100,000 residents for assault, murder, and rape in each of the 50 US states in 1973. Also given is the percent of the population living in urban areas. </p> <h3>Usage</h3> <pre>USArrests</pre> <h3>Format</h3> <p>A data frame with 50 observations on 4 variables. </p> <table summary="Rd table"> <tr> <td style="text-align: right;"> [,1] </td><td style="text-align: left;"> Murder </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Murder arrests (per 100,000)</td> </tr> <tr> <td style="text-align: right;"> [,2] </td><td style="text-align: left;"> Assault </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Assault arrests (per 100,000)</td> </tr> <tr> <td style="text-align: right;"> [,3] </td><td style="text-align: left;"> UrbanPop </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Percent urban population</td> </tr> <tr> <td style="text-align: right;"> [,4] </td><td style="text-align: left;"> Rape </td><td style="text-align: left;"> numeric </td><td style="text-align: left;"> Rape arrests (per 100,000) </td> </tr> </table> <h3>Note</h3> <p><code>USArrests</code> contains the data as in McNeil's monograph. For the <code>UrbanPop</code> percentages, a review of the table (No. 21) in the Statistical Abstracts 1975 reveals a transcription error for Maryland (and that McNeil used the same “round to even” rule that <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s <code><a href="../../base/html/Round.html">round</a>()</code> uses), as found by Daniel S Coven (Arizona). </p> <p>See the example below on how to correct the error and improve accuracy for the ‘<n>.5’ percentages. </p> <h3>Source</h3> <p>World Almanac and Book of facts 1975. (Crime rates). </p> <p>Statistical Abstracts of the United States 1975, p.20, (Urban rates), possibly available as <a href="https://books.google.ch/books?id=zl9qAAAAMAAJ&pg=PA20">https://books.google.ch/books?id=zl9qAAAAMAAJ&pg=PA20</a>. </p> <h3>References</h3> <p>McNeil, D. R. (1977) <em>Interactive Data Analysis</em>. New York: Wiley. </p> <h3>See Also</h3> <p>The <code><a href="state.html">state</a></code> data sets.</p> <h3>Examples</h3> <pre> summary(USArrests) require(graphics) pairs(USArrests, panel = panel.smooth, main = "USArrests data") ## Difference between 'USArrests' and its correction USArrests["Maryland", "UrbanPop"] # 67 -- the transcription error UA.C <- USArrests UA.C["Maryland", "UrbanPop"] <- 76.6 ## also +/- 0.5 to restore the original <n>.5 percentages s5u <- c("Colorado", "Florida", "Mississippi", "Wyoming") s5d <- c("Nebraska", "Pennsylvania") UA.C[s5u, "UrbanPop"] <- UA.C[s5u, "UrbanPop"] + 0.5 UA.C[s5d, "UrbanPop"] <- UA.C[s5d, "UrbanPop"] - 0.5 ## ==> UA.C is now a *C*orrected version of USArrests </pre> <hr /><div style="text-align: center;">[Package <em>datasets</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>