R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
178 stars 18 forks source link

Optimize subsetting #220

Open PMassicotte opened 2 months ago

PMassicotte commented 2 months ago

This is a complete rework of this functionality. It avoids using recursive function, which simplify the logic. It is also faster.

jalvesaq commented 2 months ago

It's falling in this case:

aa$bb$$cc
jalvesaq commented 2 months ago

This also doesn't seem to be 100% correct:

aa <- list(bb=c("w" = 1, "x" = 2, "y"= 3, "z" = 4))
aa$bb[3]

because the output of aa$bb[3] is different from the output of aa[["bb"]][[3]].

PMassicotte commented 2 months ago

Good catch. Will work on that.