I've been using #R and @rstudio for years to tackle all kinds of data and coding problems. Here are some of my favorite shortcut keys to improve productivity and make your life easier. (1/7)
Insert pipe - The pipe operator is everywhere in modern R code but typing it can be tedious. Use 𝗖𝘁𝗿𝗹 + 𝗦𝗵𝗶𝗳𝘁 + 𝗠 to build your pipes quicker. (2/7)
Comment/uncomment blocks - Sometimes you want to quickly disable a chunk of code without deleting it. Use 𝗖𝘁𝗿𝗹 + 𝗦𝗵𝗶𝗳𝘁 + 𝗖 to (un)comment entire code blocks. (3/7)
Multi-cursor editing - Repetetive code is quickly written but hard to edit. Use 𝗖𝘁𝗿𝗹 + 𝗔𝗹𝘁_𝗹𝗲𝗳𝘁 + 𝗠𝗼𝘂𝘀𝗲_𝗹𝗲𝗳𝘁 to spawn multiple cursors. Hold 𝗔𝗹𝘁_𝗹𝗲𝗳𝘁 + 𝗠𝗼𝘂𝘀𝗲_𝗹𝗲𝗳𝘁 and drag your mouse to edit consecutive lines at the same position. (4/7)
Move selection - Instead of copy/pasting code chunks you can simply move them up and down by pressing 𝗔𝗹𝘁_𝗹𝗲𝗳𝘁 + 𝗨𝗽/𝗗𝗼𝘄𝗻. (5/7)
Rename in scope - Sometimes you want to use a different variable name or call a different function in certain code sections. Search and Replace can be dangerous in these situations. It's safer to use 𝗖𝘁𝗿𝗹 + 𝗦𝗵𝗶𝗳𝘁 + 𝗔𝗹𝘁_𝗹𝗲𝗳𝘁 + 𝗠 to rename in scope. (6/7)
Find in files - An absolute killer feature of RStudio when working on larger projects with multiple files. Use 𝗖𝘁𝗿𝗹 + 𝗦𝗵𝗶𝗳𝘁 + 𝗙 to search (and even replace) keywords across your project. (7/7)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Christian König 🇺🇦

Christian König 🇺🇦 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(