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
As per FAQ 2.21 and 2.22, printing of DT when using := has been suppressed since 1.8.3. However, I noticed that this still happens in borderline case, e.g. when debugging via browser(). Notice that this happens when one manually runs the assignment line, and not through pressing c, n or Enter. I can reproduce this in Rgui and RStudio (some nightly build).
I can confirm the same behavior in 1.10.5.
> library(data.table)
data.table1.10.4Thefastestwayto learn (bydata.tableauthors):https://www.datacamp.com/courses/data-analysis-the-data-table-wayDocumentation: ?data.table, example(data.table) and browseVignettes("data.table")
Releasenotes, videosandslides:http://r-datatable.comDT<- data.table(a=1:3, b=letters[1:3])
DT[, c:= rnorm(3)] # doesn't print object# is browser() somehow responsible?
browser()
Calledfrom:toplevelBrowse[1]>DT[, d:= rnorm(3)] # doesn't print objectBrowse[1]>Q# doesn't appear so
sapply(1:3, function(x) {
DT<- data.table(a=1:3, b=letters[1:3])
browser()
DT[, e:= rnorm(3)] # run this manually
})
Calledfrom: FUN(X[[i]], ...)
Browse[1]>DT[, e:= rnorm(3)] # prints objectabcde1:1a-0.9089834-0.8720443-1.00349402:2b1.2618214-0.99938420.33171303:3c-2.21716940.2251432-0.2082159
Behavior is consistent in lapply as well but not in a for loop.
Which doesn't match any of the suppression rules. Whereas without browser()print is not invoked from within the loop:
debug(data.table:::print.data.table)
sapply(1:3, function(x) {
DT <- data.table(a = 1:3, b = letters[1:3])
DT[, e := rnorm(3)] # no call to print
})
I'm not sure how worth the effort it is to try and come up w a rule for this situation, as I don't know if it's possible to detect being inside browser().
As per FAQ 2.21 and 2.22, printing of DT when using
:=
has been suppressed since 1.8.3. However, I noticed that this still happens in borderline case, e.g. when debugging viabrowser()
. Notice that this happens when one manually runs the assignment line, and not through pressing c, n or Enter. I can reproduce this in Rgui and RStudio (some nightly build).I can confirm the same behavior in 1.10.5.
Behavior is consistent in
lapply
as well but not in afor
loop.This is not big deal, I rather like it because I'm curious about my objects when debugging, just something I thought I'd let you know.
The text was updated successfully, but these errors were encountered: