data.frame(Light = seq(0.0065, 1, length = 500)) %>%         # Choose light levels
  mutate("Bright depths" = depth(Light),                # Calculate depths
         "Shaded depths" = depth(Light, shade = 0.25),  # Calculate depths
         "Shallow community" = shallow(Light),
         "Mesophotic community" = mesophotic(Light),
         "Whole reef" = reef(Light)) -> depth.distribution   # Calculate community values
Light Bright depths Shaded depths Shallow community Mesophotic community Whole reef
0.0065000 100.71906 72.99317 0.0180530 0.0412324 0.0231794
0.0084910 95.37501 67.64913 0.0232555 0.0472048 0.0239493
0.0104820 91.16198 63.43610 0.0283156 0.0523527 0.0240371
0.0124729 87.68387 59.95798 0.0332391 0.0568581 0.0236190
0.0144639 84.72195 56.99606 0.0380314 0.0608340 0.0228026
boundaries <- data.frame(Boundary = c("lower", "upper"),
                         Depth = c(depth(reef_boundary()), depth(reef_boundary(), shade = 0.25)))
Boundary Depth
lower 66.53724
upper 38.81135