I would like to study the autocomplete code of R, when R is run in a terminal. For example, if you run R from the terminal and type lm(
and then tab, R will give you the arguments of lm
.
Dirk's answer here suggests that autocompletion of R is supported by the codetools package which is in base R:
Is it possible to get code completion for R in Emacs ESS similar to what is available in Rstudio?
However, I can't find where in that package it adds support for autocomplete. I grepped for 'completion' and came up empty.
The completion code is actually in the base instalation in the utils package. You can view everything associated with it (for the devel version) on R's SVN server:
http://svn.r-project.org/R/trunk/src/library/utils/R/completion.R
This code should be read in conjunction with ?completion
.
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