0

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?

Dason
  • 60,663
  • 9
  • 131
  • 148
davidhwang
  • 1,343
  • 1
  • 12
  • 19

1 Answers1

2

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.

Dason
  • 60,663
  • 9
  • 131
  • 148