Loops crown volume calculation (solution)

NoteExercise
CautionOutput solution

Code solution for Crown Volume Calculation


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

Part 1

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] 3.702491

Part 2

[1] 18.14041
[1] 9.882335

Part 3

# A tibble: 7,508 × 17
# Rowwise: 
   SURVEY  YEAR SITE  TREATMENT BLOCK PLOT    SPECIES ORIGINAL_TAG NEW_TAG DEAD 
    <dbl> <dbl> <chr> <chr>     <dbl> <chr>   <chr>          <dbl>   <dbl> <chr>
 1      1  2009 SOUTH TOTAL         2 S2TOTAL Acacia…            1      NA N    
 2      2  2010 SOUTH TOTAL         2 S2TOTAL Acacia…            1      NA N    
 3      3  2011 SOUTH TOTAL         2 S2TOTAL Acacia…            1      NA N    
 4      4  2012 SOUTH TOTAL         2 S2TOTAL Acacia…            1      NA N    
 5      5  2013 SOUTH TOTAL         2 S2TOTAL Acacia…            1      NA N    
 6      1  2009 SOUTH TOTAL         2 S2TOTAL Acacia…            2      NA N    
 7      2  2010 SOUTH TOTAL         2 S2TOTAL Acacia…            2      NA N    
 8      3  2011 SOUTH TOTAL         2 S2TOTAL Acacia…            2      NA N    
 9      4  2012 SOUTH TOTAL         2 S2TOTAL Acacia…            2      NA Y    
10      5  2013 SOUTH TOTAL         2 S2TOTAL Acacia…            2      NA N    
# ℹ 7,498 more rows
# ℹ 7 more variables: HEIGHT <dbl>, AXIS_1 <dbl>, AXIS_2 <dbl>, CIRC <dbl>,
#   MEASUREMENT <chr>, STEMS <chr>, volume <dbl>