names(mydata)[names(mydata)=="q1"] <- "q01"
I want to select 2 mydata
at the same time and then can edit them at the same time.
Some advanced text editors let you have multiple cursors, so that, for example, if I select both "mydata" in this line, and then hit delete and type "otherdata", I end up with:
names(otherdata)[names(otherdata)=="q1"] <- "q01"
Although this can be done here with a simple search and replace, sometimes having multiple selection and multiple cursors is possibly easier.
The Sublime Text editor can do this, as can Atom and Emacs.
To execute the line of source code where the cursor currently resides you press the Ctrl+Enter key (or use the Run toolbar button): After executing the line of code, RStudio automatically advances the cursor to the next line.
To run an R command, put the cursor on the line of the command and then click the Run button at the top of the file window. Or just press CTRL-Enter.
From Rstudio conf-2017
mydata
termsThis will select all the matching terms in your code
esc
when you are finishedIf 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