Skip to content

Commit

Permalink
Merge pull request #439 from sstevens2/count-fix
Browse files Browse the repository at this point in the history
Rm group by func call
  • Loading branch information
drakeasberry authored Jun 15, 2024
2 parents 1820e2d + 17b42a0 commit 893926e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions episodes/02-raster-plot.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,11 @@ values of `fct_elevation`:
unique(DSM_HARV_df$fct_elevation)
```

And we can get the count of values in each group using `dplyr`'s `group_by()`
and `count()` functions:
And we can get the count of values in each group using `dplyr`'s `count()` function:

```{r breaks-count}
DSM_HARV_df %>%
group_by(fct_elevation) %>%
count()
count(fct_elevation)
```

We might prefer to customize the cutoff values for these groups.
Expand Down Expand Up @@ -133,8 +131,7 @@ And we can get the count of values in each group in the same way we did before:

```{r break-count-custom}
DSM_HARV_df %>%
group_by(fct_elevation_2) %>%
count()
count(fct_elevation_2)
```

We can use those groups to plot our raster data, with each group being a
Expand Down

0 comments on commit 893926e

Please sign in to comment.