I have a very large data table I am importing into R. The data contains demograp
ID: 3723271 • Letter: I
Question
I have a very large data table I am importing into R. The data contains demographic information for every county the US, separated into rows by county, with each county corresponding to its state (i.e. all Alabama counties are organized by 1st column with ID #s 01001 through 01133, all Alaska counties from 02001-02290, etc. w/ the 1st 2 numbers of the ID corresponding to the state). I want to create a ggplot organized in facets by state, graphing the relationship between 2 of the columns in the large data set. How would I go about doing this, making sure all the counties are grouped and graphed just by their corresponding state?
Explanation / Answer
df$stateCode = df$id / 1000
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.