When loading a .csv
with sqldf
, everything goes fine until I load data.table
. For example:
library(sqldf)
write.table(trees, file="trees.csv", row.names=FALSE, col.names=FALSE, sep=",")
my.df <- read.csv.sql("trees.csv", "select * from file",
header = FALSE, row.names = FALSE)
works, while
library(data.table)
my.df <- read.csv.sql("trees.csv", "select * from file",
header = FALSE, row.names = FALSE)
# Error in list(...)[[1]] : subscript out of bounds
Doesn't. When loaded, data.table
informs you that
The following object(s) are masked from 'package:base':
cbind, rbind
So, I tried this
rbind <- base::rbind # `unmask` rbind from base::
library(data.table)
my.df <- read.csv.sql("trees.csv", "select * from file",
header = FALSE, row.names = FALSE)
rbind <- data.table::rbind # `mask` rbind with data.table::rbind
which works. Before I litter all my code with this trick:
What is the best practise solution to deal with masking conflicts in R?
EDIT: There is a closely related thread here, but no general solution is suggested.
Side effects are not expected to differ from those associated with the current vaccine, which include redness and swelling at the vaccine site, as well as occasional fatigue, headache and muscle soreness, according to the CDC. More serious reactions are rare.
Vaccinated people had lower infection rates when they mixed with other vaccinated people and lower rates when they mixed with unvaccinated people.
Wearing a well-fitted mask along with vaccination, self-testing, and physical distancing, helps protect you and others by reducing the chance of spreading COVID-19.
Instructors and teachers should not consider wearing only a face shield in a return to in-person instruction. To be used correctly, face shields should be coupled with face masks. Face masks that cover the nose and mouth are protective for the people around you.
As per the comments, yes, please file a bug report :
bug.report(package="data.table")
That way it won't be forgotten, you'll get an automatic email each time the status changes and you can reopen it if the fix proves to be insufficient.
EDIT:
Now in v1.6.7 on R-Forge :
do.call("rbind",...)
on an empty ...
) is fixed and test added. data.table was switching on list(...)[[1]]
rather than ..1
. Thanks to RYogi for reporting #1623.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With