Visualizing Gun Deaths
“If I had asked my customers what they wanted they would have told me faster horses.”
Height variations within a population are largely genetic, but height variations between populations are mostly environmental, anthropometric history suggests.
A few jokes
There are a handful of other special characters. The most common are
"\n", newline,
"\t", tab,
you can see the complete list by requesting help on ": ?'"', or ?"'".
You’ll also sometimes see strings like "\u00b5", this is a way of writing non-English characters that works on all platforms:
Don’t forget that you’re in a programming language and you have other tools at your disposal. Instead of creating one complex regular expression, it’s often easier to write a series of simpler regexps. If you get stuck trying to create a single regexp that solves your problem, take a step back and think if you could break the problem down into smaller pieces, solving each challenge before moving onto the next one.
Use https://byuistats.github.io/M335/data/randomletters.txt from Task 11
Duplicate Keys
Missing Keys
base::merge()
can perform all four types of joins:
dplyr | merge |
---|---|
inner_join(x, y) | merge(x, y) |
left_join(x, y) | merge(x, y, all.x = TRUE) |
right_join(x, y) | merge(x, y, all.y = TRUE), |
full_join(x, y) | merge(x, y, all.x = TRUE, all.y = TRUE) |
<>
SQL is the inspiration for dplyr’s conventions, so the translation is straightforward:
dplyr | SQL |
---|---|
inner_join(x, y, by = “z”) | SELECT * FROM x INNER JOIN y USING (z) |
left_join(x, y, by = “z”) | SELECT * FROM x LEFT OUTER JOIN y USING (z) |
right_join(x, y, by = “z”) | SELECT * FROM x RIGHT OUTER JOIN y USING (z) |
full_join(x, y, by = “z”) | SELECT * FROM x FULL OUTER JOIN y USING (z) |
<>
Learning how to articulate good questions is strongly correlated with quality structured thinking
The baseball joining task for Thursday is tricky and requires focus.