Question

I've been using Rstudio for a few weeks now, and the tab completion has worked inconsistently for me. For example:

my_variable = 10
my_va

Those are the only two lines in my R-script. When I press tab to use completion, a small message appears next to the text bar saying "(No matches)", when I believe it should find the matching variable called "my_variable" in the line above.

Does anyone know how to use tab completion in Rstudio?

Was it helpful?

Solution

RStudio looks at the workspace and the packages loaded to try to do the tab-completion. If you haven't run the first line then RStudio won't recognize that you want to complete to "my_variable".

If you run your first line then RStudio will be able to tell that you have a variable called my_variable and will offer to complete it to that.

You can read a little bit more in the RStudio documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top