-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print.data.table
warns when options(datatable.show.indices=TRUE)
and an index exists
#6806
Comments
@aitap I am excited to get involved and help with this bug issue. Could you assign it to me? I am looking forward to contributing and collaborating with the team. Thank you!" |
@PradeepFSTdhane123 You are absolutely welcome to try your hand at preventing the warning. Good luck! Start by reproducing the warning with |
print.data.table
may warn when key and index are both presentprint.data.table
may warn when an index is present
Hi , i was checking out this issue , i am not able to reproduce it .
can you please explain. |
It looks like you also need options(datatable.show.indices=TRUE). So
the full reproducer is either library(data.table); options(warn = 2,
error = recover); example(print.data.table) or do the same thing
manually:
library(data.table)
DT <- data.table(x = 10:1, y = 1:10) # <-- also needs multiple columns?
setindex(DT, x)
options(
datatable.show.indices = TRUE,
warn = 2, error = recover
)
DT
Works for me on both the CRAN version and the latest Git revision.
|
print.data.table
may warn when an index is presentprint.data.table
warns when options(datatable.show.indices=TRUE) and an index exists
print.data.table
warns when options(datatable.show.indices=TRUE) and an index existsprint.data.table
warns when options(datatable.show.indices=TRUE)
and an index exists
Observed while reading the
source("data.table-Ex")
output for translation purposes; taken fromexample(print.data.table)
:The warning most likely originates here:
data.table/R/print.data.table.R
Line 106 in b7f2106
May be a good exercise in finding the emergency exit from R Inferno. If not, will debug myself soon.
The text was updated successfully, but these errors were encountered: