The test of the machine is the satisfaction it gives you. There isn't any other test. If the machine produces tranquility it's right. If it disturbs you it's wrong until either the machine or your mind is changed.
βZen and the Art of Motorcycle Maintenance
Discover what the IDE can do for you
Mold the tool to your workflow
Discover what the IDE can do for you
Adapt your workflow
Mold the tool to your workflow
Discover what the IDE can do for you
There's always going to be a certain amount of friction
coding is hard, right
the goal is to reduce friction between you and thinking about your code
listen to the friction is a signal, listen to the things that disturb you
πΌ usethis::use_course("gadenbuie/rstudio-ide-tips-demo")
πΈ https://rstudio-ide-tips.netlify.app
π€ How do you and RStudio get along best and worst?
gets me
git
gets me not
Cmd β
Option β₯
Ctrl
Alt
π
Open R/00_general.R
What panes are available?
Where do you put them?
Drag to resize
Pane Layout
Half Screen
Full Screen
Press Ctrl + ...
1 β Source
2 β Console
3 β Help
5 β β¦
6 β β¦
7 β β¦
8 β β¦
9 β β¦
π Stretch your fingers
Press Ctrl + Shift + ...
1 β Source
2 β Console
3 β Help
5 β Files
6 β Plots
7 β Packages
8 β Environment
9 β Viewer
Run this code and then press
Ctrl + Shift + 1
library(dplyr)View(starwars)
Run this code and then press
Ctrl + Shift + 1
library(dplyr)View(starwars)
Pipe into View()
starwars %>% filter(species == "human") %>% View()
Run this code and then press
Ctrl + Shift + 1
library(dplyr)View(starwars)
Give your viewer a name
starwars %>% filter(species == "human") %>% View("humans")
Solve the mystery of the black_box()
function...
Jump Anywhere
Go Back
Jump to Function
black_box()
F2
Jump to Help
comment(x) <- "..."
F1
Jump to code_style.R
Use the styler package for magically clean code
Use identity()
or I()
to walk through pipe steps
Move code up/down to reorganize
Add new lines and fix indentation: Ctrl + I
Let your code breathe vertically!
Change order of selection in a select()
Use multiple cursors by Cmd + Opt +
I use Ctrl + Shift + S
for style selection and Ctrl + Shift + Cmd + S
for style file
Click to create new cursors Cmd/Ctrl + Opt/Alt +
Click and drag to select/create new cursors Opt/Alt +
Create new cursors with the keyboard Cmd/Ctrl + Opt/Alt +
Create new cursors from selection Find and Add Next Find and Select All
Find all - Cmd + Alt + F
Find and Add Next - Cmd + D
If code is more vertical, alignment is easier.
Align blocks of similar arguments or names or anytime there's repetition
Alignment makes it easier to scan for problems
New in RStudio 1.4 along with a few other awesome features
β Command Palette
π Rainbow Parens
π Visual Markdown
π± New Source Column
πΎ RStudio Preview
Add section labels by pressing Cmd/Ctrl + Shift + R
# Library -----------------------------------------------------------------
Browse section labels
Source as Local Job
Configure Job Settings
Restart R Session
Cmd + Shift + 0
Ctrl + Shift + F10
Run Up To Here
R Cmd/Ctrl + Opt/Alt + B
Rmd Cmd/Ctrl + Opt/Alt + P
Always start with a blank slate
usethis::use_blank_slate()
https://rstats.wtf/save-source.html
π Global/Project Settings
Project-oriented workflow, Jenny Bryan
Why should I use the here
package, Malcom Barrett
Use Alfred to launch projects, Hadley Wickham
Project-oriented workflow, Jenny Bryan
Why should I use the here
package, Malcom Barrett
Use Alfred to launch projects, Hadley Wickham
Automatically renders an R Markdown document whenever you save πΎ
Jump to docs/try/infinite_moon_reader.Rmd
Edit the document and press save to see it in action
Global Options β Code β Edit Snippets
Global Options β Code β Edit Snippets
Snippet Syntax
snippet s3generic ${1:generic} <- function(x, ...) { UseMethod("${1:generic}", x) } ${1:generic}.${2:method} <- function(x, ...) { ${0} }
Global Options β Code β Edit Snippets
Snippet Syntax
snippet s3generic ${1:generic} <- function(x, ...) { UseMethod("${1:generic}", x) } ${1:generic}.${2:method} <- function(x, ...) { ${0} }
Try this one: shinymod
garrickadenbuie.com/project/rsthemes/
remotes::install_github("gadenbuie/rsthemes", dependencies = TRUE)rsthemes::install_rsthemes()rsthemes::try_rsthemes()
π Toggle Dark Mode
π Auto Choose Dark or Light Theme
β€οΈ Next Favorite Theme
Toggle Dark/Light
Ctrl + Option + D
Next Favorite Theme
Ctrl + Option + N
Tools > Keyboard Shortcuts Help
Take 3 minutes to create new shortcuts for
Find and Add Next
Find and Select All
03:00
π There are many options to check and adjust in Global Options
π There are many options to check and adjust in Global Options
Fonts
Themes
π There are many options to check and adjust in Global Options
Fonts
Themes
The test of the machine is the satisfaction it gives you. There isn't any other test. If the machine produces tranquility it's right. If it disturbs you it's wrong until either the machine or your mind is changed.
βZen and the Art of Motorcycle Maintenance
Keyboard shortcuts
β, β, Pg Up, k | Go to previous slide |
β, β, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
o | Tile View: Overview of Slides |
Esc | Back to slideshow |
The test of the machine is the satisfaction it gives you. There isn't any other test. If the machine produces tranquility it's right. If it disturbs you it's wrong until either the machine or your mind is changed.
βZen and the Art of Motorcycle Maintenance
Discover what the IDE can do for you
Mold the tool to your workflow
Discover what the IDE can do for you
Adapt your workflow
Mold the tool to your workflow
Discover what the IDE can do for you
There's always going to be a certain amount of friction
coding is hard, right
the goal is to reduce friction between you and thinking about your code
listen to the friction is a signal, listen to the things that disturb you
πΌ usethis::use_course("gadenbuie/rstudio-ide-tips-demo")
πΈ https://rstudio-ide-tips.netlify.app
π€ How do you and RStudio get along best and worst?
gets me
git
gets me not
Cmd β
Option β₯
Ctrl
Alt
π
Open R/00_general.R
What panes are available?
Where do you put them?
Drag to resize
Pane Layout
Half Screen
Full Screen
Press Ctrl + ...
1 β Source
2 β Console
3 β Help
5 β β¦
6 β β¦
7 β β¦
8 β β¦
9 β β¦
π Stretch your fingers
Press Ctrl + Shift + ...
1 β Source
2 β Console
3 β Help
5 β Files
6 β Plots
7 β Packages
8 β Environment
9 β Viewer
Run this code and then press
Ctrl + Shift + 1
library(dplyr)View(starwars)
Run this code and then press
Ctrl + Shift + 1
library(dplyr)View(starwars)
Pipe into View()
starwars %>% filter(species == "human") %>% View()
Run this code and then press
Ctrl + Shift + 1
library(dplyr)View(starwars)
Give your viewer a name
starwars %>% filter(species == "human") %>% View("humans")
Solve the mystery of the black_box()
function...
Jump Anywhere
Go Back
Jump to Function
black_box()
F2
Jump to Help
comment(x) <- "..."
F1
Jump to code_style.R
Use the styler package for magically clean code
Use identity()
or I()
to walk through pipe steps
Move code up/down to reorganize
Add new lines and fix indentation: Ctrl + I
Let your code breathe vertically!
Change order of selection in a select()
Use multiple cursors by Cmd + Opt +
I use Ctrl + Shift + S
for style selection and Ctrl + Shift + Cmd + S
for style file
Click to create new cursors Cmd/Ctrl + Opt/Alt +
Click and drag to select/create new cursors Opt/Alt +
Create new cursors with the keyboard Cmd/Ctrl + Opt/Alt +
Create new cursors from selection Find and Add Next Find and Select All
Find all - Cmd + Alt + F
Find and Add Next - Cmd + D
If code is more vertical, alignment is easier.
Align blocks of similar arguments or names or anytime there's repetition
Alignment makes it easier to scan for problems
New in RStudio 1.4 along with a few other awesome features
β Command Palette
π Rainbow Parens
π Visual Markdown
π± New Source Column
πΎ RStudio Preview
Add section labels by pressing Cmd/Ctrl + Shift + R
# Library -----------------------------------------------------------------
Browse section labels
Source as Local Job
Configure Job Settings
Restart R Session
Cmd + Shift + 0
Ctrl + Shift + F10
Run Up To Here
R Cmd/Ctrl + Opt/Alt + B
Rmd Cmd/Ctrl + Opt/Alt + P
Always start with a blank slate
usethis::use_blank_slate()
https://rstats.wtf/save-source.html
π Global/Project Settings
Project-oriented workflow, Jenny Bryan
Why should I use the here
package, Malcom Barrett
Use Alfred to launch projects, Hadley Wickham
Project-oriented workflow, Jenny Bryan
Why should I use the here
package, Malcom Barrett
Use Alfred to launch projects, Hadley Wickham
Automatically renders an R Markdown document whenever you save πΎ
Jump to docs/try/infinite_moon_reader.Rmd
Edit the document and press save to see it in action
Global Options β Code β Edit Snippets
Global Options β Code β Edit Snippets
Snippet Syntax
snippet s3generic ${1:generic} <- function(x, ...) { UseMethod("${1:generic}", x) } ${1:generic}.${2:method} <- function(x, ...) { ${0} }
Global Options β Code β Edit Snippets
Snippet Syntax
snippet s3generic ${1:generic} <- function(x, ...) { UseMethod("${1:generic}", x) } ${1:generic}.${2:method} <- function(x, ...) { ${0} }
Try this one: shinymod
garrickadenbuie.com/project/rsthemes/
remotes::install_github("gadenbuie/rsthemes", dependencies = TRUE)rsthemes::install_rsthemes()rsthemes::try_rsthemes()
π Toggle Dark Mode
π Auto Choose Dark or Light Theme
β€οΈ Next Favorite Theme
Toggle Dark/Light
Ctrl + Option + D
Next Favorite Theme
Ctrl + Option + N
Tools > Keyboard Shortcuts Help
Take 3 minutes to create new shortcuts for
Find and Add Next
Find and Select All
03:00
π There are many options to check and adjust in Global Options
π There are many options to check and adjust in Global Options
Fonts
Themes
π There are many options to check and adjust in Global Options
Fonts
Themes