diff --git a/NEWS.md b/NEWS.md index 59f25a77f..4236e8b07 100644 --- a/NEWS.md +++ b/NEWS.md @@ -133,8 +133,6 @@ rowwiseDT( 8. `measurev()` was implemented and documented in v1.15.0, for use within `melt()`, and it is now exported (dependent packages can now use without a NOTE from CRAN check). -9. Using a double vector in `set()`'s `j=` no longer throws a warning about preferring integer, [#6594](https://github.com/Rdatatable/data.table/issues/6594). While it may improve efficiency to use integer, there's no guarantee it's an improvement and the difference is likely to be minimal. The coercion will still be reported under `datatable.verbose=TRUE`. For package/production use cases, static analyzers such as `lintr::implicit_integer_linter()` can also report when numeric literals should be rewritten as integer literals. - # data.table [v1.16.0](https://github.com/Rdatatable/data.table/milestone/30) (25 August 2024) ## BREAKING CHANGES diff --git a/src/assign.c b/src/assign.c index 2f6715e83..b280c2259 100644 --- a/src/assign.c +++ b/src/assign.c @@ -425,8 +425,7 @@ SEXP assign(SEXP dt, SEXP rows, SEXP cols, SEXP newcolnames, SEXP values) } else { if (isReal(cols)) { cols = PROTECT(coerceVector(cols, INTSXP)); protecti++; - if (verbose) - Rprintf(_("Coerced j from numeric to integer. Please pass integer for efficiency; e.g., 2L rather than 2")); + warning(_("Coerced j from numeric to integer. Please pass integer for efficiency; e.g., 2L rather than 2")); } if (!isInteger(cols)) error(_("j is type '%s'. Must be integer, character, or numeric is coerced with warning."), type2char(TYPEOF(cols)));