Skip to content

Commit

Permalink
Update Error Message to Explain Namespace Restrictions for := and `…
Browse files Browse the repository at this point in the history
…let` in `data.table` (#6302)

* udated the error message

* suggested wording

---------

Co-authored-by: nitish jha <nitishjha@nitishs-MacBook-Air.local>
Co-authored-by: Michael Chirico <chiricom@google.com>
  • Loading branch information
3 people authored Jul 20, 2024
1 parent 069eed9 commit 665b316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -2770,7 +2770,7 @@ address = function(x) .Call(Caddress, eval(substitute(x), parent.frame()))

":=" = function(...) {
# this error is detected when eval'ing isub and replaced with a more helpful one when using := in i due to forgetting a comma, #4227
stopf('Check that is.data.table(DT) == TRUE. Otherwise, :=, `:=`(...) and let(...) are defined for use in j, once only and in particular ways. See help(":=").', class="dt_invalid_let_error")
stopf('Check that is.data.table(DT) == TRUE. Otherwise, :=, `:=`(...) and let(...) are defined for use in j, once only and in particular ways. Note that namespace-qualification like data.table::`:=`(...) is not supported. See help(":=").', class="dt_invalid_let_error")
}

# TODO(#6197): Export these.
Expand Down

0 comments on commit 665b316

Please sign in to comment.