map(seq(0.05, 0.2, by = 0.01), function(x) { data.frame(Light = seq(0.0065, 1, length = 500)) %>% # Choose light levels mutate("Bright depths" = depth(Light, KdPAR = x), # Calculate depths "Shaded depths" = depth(Light, KdPAR = x, shade = 0.25), # Calculate depths "Shallow community" = shallow(Light), "Mesophotic community" = mesophotic(Light), "Whole reef" = reef(Light), "KdPAR" = x) }) %>% # Calculate community values bind_rows() -> Kdpar.sensitivity
boundaries <- data.frame(Boundary = c("lower", "upper"), Depth = c(depth(reef_boundary()), depth(reef_boundary(), shade = 0.25)))