Compare this behaviour,
df <- data.frame(a11111 = rnorm(5,0), b11111= rnorm(5,0))
df$a # pressing tab at this instance auto-completes a11111
df$a # hitting return at this instance returns the value for a11111
with this behaviour:
library(data.table)
dt <- data.table(df)
dt[,a # pressing tab at this instance does not auto-complete a11111
dt[,a # pressing return at this instance returns an 'object not found' error
dt$a # behaves like how it does for the data frame
I assume the return works because x$name
is equivalent to x[["name", exact = FALSE]]
? However, I don't understand the auto-complete behaviour. Since the data.table
syntax is based on [
, is it practical and/or possible for dt[,a <tab/return>
to work something like dt$a<tab/return>
?
I'm running Rstudio 0.97.551 with R version 3.0.1 on Windows 7, 64 bit.
It is currently possible in the latest dev version of RStudio.
In case of any issues in terms of data.table auto-complete you may try post comment in this issue.
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