Tab completion

January 30, 2011

(This article was first published on The Data Monkey, and kindly contributed to R-bloggers)

Let’s say your hands are aching from too much typing in of variables. What to do? Get a keyboard tray and learn proper ergonomics, of course.

But what if you just want to reduce the amount of typing in of variables you do for reasons of laziness…err…efficiency. Well, you can type the part of the variable that’s unique and then hit Tab. Stata or R (or many other programming environments) will both fill in the rest for you.

Suppose you have variables named:

If you wanted the first variable to show up. Just type “A” and hit TAB.
But if you want the second, you’d have to type “Mara” and hit TAB, because until you hit the fourth letter it won’t be sure which variable you want.

To leave a comment for the author, please follow the link and comment on their blog: The Data Monkey. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)