show_geometry: Show geometry

Description Usage Arguments Details Examples

Description

Shows the cross section geometry and fitted model for a given reach and exposure level

Usage

1
2
show_geometry(WSEw, WSEw_obs, cross_section, method, showLegend = TRUE,
  ...)

Arguments

WSEw

true height and width values

WSEw_obs

observed height and width values

cross_section

data frame with x, b for a given reach

method

l, sb, nl, nlsb

...

optional parameters for plot()

Details

The code could use a bit of tweaking, but it more or less does what it's supposed to.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(minpack.lm) # required for NL, NLSB methods
exp_dir <- "./Outputs/Final/p21" # pool 21
r <- 1 # reach 1
cross_sections_avg <- readRDS(file.path(exp_dir, "cross_sections_avg.rds"))
cross_section <- data.frame(x = cross_sections_avg$x[[r]], b = cross_sections_avg$b[[r]] )
rWSEw <- readRDS(file.path(exp_dir, "rWSEw.rds"))
WSEw_obs1 <- observe2(WSEw = rWSEw[[r]], exposure = 0.5)
show_geometry(WSEw = rWSEw[[r]], 
              WSEw_obs = WSEw_obs1, 
              cross_section = cross_section,
              method = "nlsb", ylim = c(130, 145))

jschap1/WSEw documentation built on May 12, 2019, 10:50 a.m.