EdM44 / hydraulics

hydraulics
https://edm44.github.io/hydraulics/
GNU General Public License v3.0
9 stars 5 forks source link

Render error using `manningc()` #4

Open graphdr opened 6 months ago

graphdr commented 6 months ago

In my fork of the hydraulics package, if I open the Rmd file of the hydraulics vignette, I can run each code chunk successfully.

However, when I try to render (knit) the Rmd file, I consistently get an error message from the [manningc-1b] code chunk.

Quitting from lines 258-260 [manningc-1b] (hydraulics_vignette.Rmd)
Error in `manningc()`:
! unused argument (n_var = TRUE)
Execution halted

The code chunk reads:

```{r manningc-1b, message=FALSE, warning=FALSE}
ans <- manningc(Q=0.01, n=0.013, Sf=0.001, d = 0.2, n_var=TRUE, units="SI", ret_units = TRUE)
knitr::kable(format(as.data.frame(ans), digits = 2), format = "pipe", padding=0)
```

n_var is a legitimate argument. Changing the argument to n_var = FALSE produces the same error. I'm not sure what's wrong here, though it doesn't seem to be the function itself. Any suggestions?

Thanks!

EdM44 commented 6 months ago

I am not sure what would cause that. The n_var option was added in v 0.7.0, the latest update. I don't see how knitting the file would access an older version than running it chunk by chunk, but that's the only thing I can think of that would produce that behavior. I will see if I can reproduce this error in the next few days.