Correct tidyr::unnamed_wider (#1061)
This commit is contained in:
@@ -243,7 +243,7 @@ df2 |>
|
|||||||
unnest_wider(y, names_sep = "_")
|
unnest_wider(y, names_sep = "_")
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll notice that `unnested_wider()`, much like `pivot_wider()`, turns implicit missing values in to explicit missing values.
|
You'll notice that `unnest_wider()`, much like `pivot_wider()`, turns implicit missing values in to explicit missing values.
|
||||||
|
|
||||||
### `unnest_longer()`
|
### `unnest_longer()`
|
||||||
|
|
||||||
@@ -397,7 +397,7 @@ repos |>
|
|||||||
```
|
```
|
||||||
|
|
||||||
At first glance, it might seem like we haven't improved the situation: while we have more rows (176 instead of 6) each element of `json` is still a list.
|
At first glance, it might seem like we haven't improved the situation: while we have more rows (176 instead of 6) each element of `json` is still a list.
|
||||||
However, there's an important difference: now each element is a **named** list so we can use `unnamed_wider()` to put each element into its own column:
|
However, there's an important difference: now each element is a **named** list so we can use `unnest_wider()` to put each element into its own column:
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
repos |>
|
repos |>
|
||||||
|
|||||||
Reference in New Issue
Block a user