Skip to content

Commit 7d5e273

Browse files
committed
improve define_pmt
1 parent a30e9f0 commit 7d5e273

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/pmt.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ define_pmt <- function(
231231
if (typeof(statistic) == "closure") {
232232
private$.statistic_func <- statistic
233233
private$.compile()
234-
} else if (!is.character(statistic)) {
234+
} else if (!is.character(statistic) || length(statistic) > 1) {
235235
stop("'statistic' must be a closure or a character string")
236236
} else {
237237
impl <- paste0("impl_", inherit, "_pmt")

0 commit comments

Comments
 (0)