Skip to content

Commit 893926e

Browse files
authored
Merge pull request #439 from sstevens2/count-fix
Rm group by func call
2 parents 1820e2d + 17b42a0 commit 893926e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

episodes/02-raster-plot.Rmd

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,11 @@ values of `fct_elevation`:
8585
unique(DSM_HARV_df$fct_elevation)
8686
```
8787

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

9190
```{r breaks-count}
9291
DSM_HARV_df %>%
93-
group_by(fct_elevation) %>%
94-
count()
92+
count(fct_elevation)
9593
```
9694

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

134132
```{r break-count-custom}
135133
DSM_HARV_df %>%
136-
group_by(fct_elevation_2) %>%
137-
count()
134+
count(fct_elevation_2)
138135
```
139136

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

0 commit comments

Comments
 (0)