Skip to content

Commit 803dd0b

Browse files
committed
fix bug in weight
1 parent b492119 commit 803dd0b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

R/weight.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ add_total_weight_by_haul <- function (x,
483483
if (n_aphia == 1) {
484484
stop(txt)
485485
} else {
486-
if (verbose) message(txt, " Skipping: ", aphia[i])
486+
if (verbose) message(txt, " Skipping: ", aphia)
487487
return(NULL)
488488
}
489489
}
@@ -498,7 +498,7 @@ add_total_weight_by_haul <- function (x,
498498
if (n_aphia == 1) {
499499
stop(txt)
500500
} else {
501-
if (verbose) message(txt, " Skipping: ", aphia[i])
501+
if (verbose) message(txt, " Skipping: ", aphia)
502502
return(NULL)
503503
}
504504
}
@@ -507,7 +507,7 @@ add_total_weight_by_haul <- function (x,
507507
if (n_aphia == 1) {
508508
stop(txt)
509509
} else {
510-
if (verbose) message(txt, " Skipping: ", aphia[i])
510+
if (verbose) message(txt, " Skipping: ", aphia)
511511
return(NULL)
512512
}
513513
}
@@ -524,8 +524,7 @@ add_total_weight_by_haul <- function (x,
524524
if (n_aphia > 1) {
525525
xsub <- add_numbers_at_length(xsub,
526526
cm_breaks = cm_breaks,
527-
by = cm_breaks[2] -
528-
cm_breaks[1])
527+
by = cm_breaks[2] - cm_breaks[1])
529528
}
530529

531530
Wgt <- sweep(xsub[["HH"]]$N, 2, LW, "*")

0 commit comments

Comments
 (0)