Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-rohan-NOAA committed Dec 16, 2024
1 parent 9a98842 commit e1d7f59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions R/calc_fixed_depth_bt.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@
calc_fixed_depth_var_bt <-
function(depth,
var,
ref_depth,
min_depth = 0) {
ref_depth) {

# Case when there's no data or surface data are missing
if(min(depth) > (ref_depth + 5) | length(depth) < 1) {
return(NA)
}

# Select only data from below the surface
var <- var[depth >= min_depth]
depth <- depth[depth >= min_depth]
var <- var[depth >= 0]
depth <- depth[depth >= 0]

# Case where there's no data shallower than the reference depth, but data within 5 m
if(length(depth) > 1 & min(depth) > ref_depth) {
Expand Down
2 changes: 1 addition & 1 deletion man/calc_fixed_depth_var_bt.Rd

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

0 comments on commit e1d7f59

Please sign in to comment.