You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(6000.013, frollmean(dx, 3), error="x must be of type numeric or logical, or a list, data.frame or data.table of such")
83
+
test(6000.013, frollmean(dx, 3), error="'x' must be of type numeric or logical, or a list, data.frame or data.table of such")
84
84
#dx = data.table(real=1:10/2, logi=logical(10))
85
85
#test(6000.014, frollmean(dx, 3), error="x must be list, data.frame or data.table of numeric types") # commented out as support added in #3749, tested in .009
@@ -1380,8 +1380,8 @@ test(6010.545, frollapply(1:2, 2, sum, simplify=NA), error="must be TRUE or FALS
1380
1380
test(6010.561, frollapply(x=1:2, N=2, FUN=sum), c(NA,3L), warning="'x' is deprecated in frollapply, use 'X' instead")
1381
1381
test(6010.562, frollapply(X=1:2, n=2, FUN=sum), c(NA,3L), warning="'n' is deprecated in frollapply, use 'N' instead")
1382
1382
test(6010.563, frollapply(x=1:2, n=2, FUN=sum), c(NA,3L), warning=c("'x' is deprecated in frollapply, use 'X' instead","'n' is deprecated in frollapply, use 'N' instead"))
1383
-
test(6010.564, frollapply(1:2, c("a","a"), length, adaptive=TRUE), error="n must be an integer vector or list of an integer vectors")
1384
-
test(6010.565, frollapply(1:2, list(c("a","a")), length, adaptive=TRUE), error="n must be an integer vector or list of an integer vectors")
1383
+
test(6010.564, frollapply(1:2, c("a","a"), length, adaptive=TRUE), error="'N' must be an integer vector or list of integer vectors")
1384
+
test(6010.565, frollapply(1:2, list(c("a","a")), length, adaptive=TRUE), error="'N' must be an integer vector or list of integer vectors")
test(6010.567, frollapply(list(1:2, list(c("a","b"))), 2, length, by.column=FALSE), error="frollapply by.column=FALSE got list in 'X' but it is not valid one")
1387
1387
test(6010.568, frollapply(list(data.frame(x=1:2), data.frame(x=I(list(1:2)))), 2, length, by.column=FALSE), error="not all columns of data.frames/data.tables are atomic")
Copy file name to clipboardExpand all lines: src/frollR.c
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ SEXP coerceX(SEXP obj) {
15
15
for (R_len_ti=0; i<nobj; i++) {
16
16
SEXPthis_obj=VECTOR_ELT(obj, i);
17
17
if (!(isReal(this_obj) ||isInteger(this_obj) ||isLogical(this_obj)))
18
-
error(_("x must be of type numeric or logical, or a list, data.frame or data.table of such"));
18
+
error(_("'x' must be of type numeric or logical, or a list, data.frame or data.table of such"));
19
19
SET_VECTOR_ELT(x, i, coerceAs(this_obj, PROTECT(ScalarReal(NA_REAL)), /*copyArg=*/ScalarLogical(false))); // copyArg=false will make type-class match to return as-is, no copy
0 commit comments