From 727e36097a4b9284b6c869ac2fe0e3546fec966d Mon Sep 17 00:00:00 2001 From: Brett Klamer Date: Fri, 26 Aug 2016 08:40:24 -0400 Subject: [PATCH] Fixing typos in hierarchy.Rmd (#308) --- hierarchy.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hierarchy.Rmd b/hierarchy.Rmd index 541c12d..f862926 100644 --- a/hierarchy.Rmd +++ b/hierarchy.Rmd @@ -37,7 +37,7 @@ Sometimes you get data structures that are very deeply nested. A common source o issues <- jsonlite::fromJSON("issues.json", simplifyVector = FALSE) ``` -You might be tempted to use `str()` on this data. Unfortunately, however, `str()` is not designed for lists that are both deep and wide, and you'll tend to get overwhelemd by the output. A better strategy is to pull the list apart piece by piece. +You might be tempted to use `str()` on this data. Unfortunately, however, `str()` is not designed for lists that are both deep and wide, and you'll tend to get overwhelmed by the output. A better strategy is to pull the list apart piece by piece. First, figure out how many elements are in the list, take a look at one, and then check they're all the same structure. In this case there are eight elements, and the first element is another list. @@ -104,7 +104,7 @@ To get the results into a character vector, we need to tell purrr what it should issues %>% map_chr(c("pull_request", "html_url"), .null = NA) ``` -(You might wonder why that isn't the default value since it's so useful. Well, if it was the default, you'd never get an error message if you had a typo in the names. You'd just get a vector of missing values. That would be annoying to debug becase it's a silent failure.) +(You might wonder why that isn't the default value since it's so useful. Well, if it was the default, you'd never get an error message if you had a typo in the names. You'd just get a vector of missing values. That would be annoying to debug because it's a silent failure.) It's possible to mix position and named indexing by using a list