We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e63dff5 commit 6eb5c50Copy full SHA for 6eb5c50
1 file changed
R/FLStock.R
@@ -124,10 +124,14 @@ is.FLStock <- function(x)
124
125
# F
126
if(uns == 'f') {
127
- res <- n * exp(-(h * ph + m * pm)) * wt * sel
+ # SET f to 0 if ph = 0
128
+ f <- ifelse(ph == 0, 0, h * ph)
129
+ res <- n * exp(-(f + m * pm)) * wt * sel
130
# HR
131
} else if(uns == 'hr') {
- res <- n * (1 - h * ph) * exp(-m * pm) * wt * sel
132
+ # SET h mult to 1 if ph = 0
133
+ hm <- ifelse(ph == 0, 1, 1 - h * ph)
134
+ res <- n * hm * exp(-m * pm) * wt * sel
135
# else NA
136
} else {
137
res <- quantSums(n) %=% as.numeric(NA)
0 commit comments