Graphics Programs Reference
In-Depth Information
That's a little better. The lines from reading, to math, to writing seldom
criss-cross and almost run parallel. This makes sense that states with
high reading scores also have math and writing scores. Similarly, states
with low reading scores tend to have low math and writing scores.
Then something interesting happens as you go from SAT scores to per-
centage of graduates who take the SAT. It looks like the states with higher
SAT score averages tend to have a lower percentage of graduates who
take the test. It's the opposite for states with lower SAT averages. My spe-
cialty isn't in education, but my best bet is that in some states everyone
takes the SAT, whereas in others people don't take the test if they're not
planning to go to college. Thus, the average comes down when you require
people who don't care about the results to take the test.
You can make this point more obvious by offering some contrasting col-
ors. The parallel() function gives you full control over the colors with the
col argument. Previously, you used only a single color ( #000000 ), but you
can also pass it an array of colors, a color value for each row of data. Now
make the states in the 50 th percentile of reading scores black and the bot-
tom half gray. Use summary() to find the medians in the education data.
Simply enter summary(education) in the console. This actually gives you
summary stats for all columns, but it's a quick way to find that the median
for reading is 523.
state reading math writing
Alabama : 1 Min. :466.0 Min. :451.0 Min. :455.0
Alaska : 1 1st Qu.:497.8 1st Qu.:505.8 1st Qu.:490.0
Arizona : 1 Median :523.0 Median :525.5 Median :510.0
Arkansas : 1 Mean :533.8 Mean :538.4 Mean :520.8
California: 1 3rd Qu.:571.2 3rd Qu.:571.2 3rd Qu.:557.5
Colorado : 1 Max. :610.0 Max. :615.0 Max. :588.0
(Other) :46
percent_graduates_sat pupil_staff_ratio dropout_rate
Min. : 3.00 Min. : 4.900 Min. :-1.000
1st Qu.: 6.75 1st Qu.: 6.800 1st Qu.: 2.950
Median :34.00 Median : 7.400 Median : 3.950
Mean :37.35 Mean : 7.729 Mean : 4.079
3rd Qu.:66.25 3rd Qu.: 8.150 3rd Qu.: 5.300
Max. :90.00 Max. :12.100 Max. : 7.600
Search WWH ::




Custom Search