Skip to content

Commit

Permalink
add n parameter to cross_section
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejohnson51 committed May 23, 2024
1 parent 8a476c0 commit 43dbec1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Imports:
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Suggests:
distill,
DT,
Expand Down
5 changes: 3 additions & 2 deletions R/channel_shape.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ compute_n <- function(df, S = .02){
#' @param r The corresponding Dingman's r coefficient
#' @param TW width of the channel at bankfull
#' @param Ymax maximum depth of the channel at bankfull
#' @param n the number of points to construct in the XS
#' @return depth values every 1m along the cross section
#' @family hydraulics
#' @export

cross_section <- function(r, TW = 30, Ymax = 2){
cross_section <- function(r, TW = 30, Ymax = 2, n = 30){

TW <- as.integer(TW)
half <- TW/2
half <- ceiling(n/2)
x_list <- numeric()
z_list <- numeric()

Expand Down
4 changes: 3 additions & 1 deletion man/cross_section.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43dbec1

Please sign in to comment.