Loops tree growth (solution)

NoteExercise
CautionOutput solution

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
  dat <- vroom(...)
  problems(dat)
Rows: 7508 Columns: 16
── Column specification ────────────────────────────────────────────────────────
Delimiter: "\t"
chr (7): SITE, TREATMENT, PLOT, SPECIES, DEAD, MEASUREMENT, STEMS
dbl (9): SURVEY, YEAR, BLOCK, ORIGINAL_TAG, NEW_TAG, HEIGHT, AXIS_1, AXIS_2,...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

1

[1] 2.9

2

`summarise()` has regrouped the output.
ℹ Summaries were computed grouped by TREATMENT and ORIGINAL_TAG.
ℹ Output is grouped by TREATMENT.
ℹ Use `summarise(.groups = "drop_last")` to silence this message.
ℹ Use `summarise(.by = c(TREATMENT, ORIGINAL_TAG))` for per-operation grouping
  (`?dplyr::dplyr_by`) instead.
# A tibble: 1,518 × 3
# Groups:   TREATMENT [4]
   TREATMENT ORIGINAL_TAG  growth
   <chr>            <dbl>   <dbl>
 1 MEGA                64  -2.28 
 2 MEGA                65 NaN    
 3 MEGA                87   1.43 
 4 MEGA                88  -0.5  
 5 MEGA                89   1.08 
 6 MEGA                90   2.08 
 7 MEGA                91   2.2  
 8 MEGA                92   0.825
 9 MEGA                93   1.23 
10 MEGA               123   0.375
# ℹ 1,508 more rows

3

`stat_bin()` using `bins = 30`. Pick better value `binwidth`.
Warning: Removed 29 rows containing non-finite outside the scale range
(`stat_bin()`).

4

`summarise()` has regrouped the output.
`stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ℹ Summaries were computed grouped by TREATMENT and ORIGINAL_TAG.
ℹ Output is grouped by TREATMENT.
ℹ Use `summarise(.groups = "drop_last")` to silence this message.
ℹ Use `summarise(.by = c(TREATMENT, ORIGINAL_TAG))` for per-operation grouping
  (`?dplyr::dplyr_by`) instead.
Warning: Removed 29 rows containing non-finite outside the scale range
(`stat_bin()`).

`summarise()` has regrouped the output.
`stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ℹ Summaries were computed grouped by SPECIES and ORIGINAL_TAG.
ℹ Output is grouped by SPECIES.
ℹ Use `summarise(.groups = "drop_last")` to silence this message.
ℹ Use `summarise(.by = c(SPECIES, ORIGINAL_TAG))` for per-operation grouping
  (`?dplyr::dplyr_by`) instead.
Warning: Removed 29 rows containing non-finite outside the scale range
(`stat_bin()`).