Open samanthacsik opened 1 year ago
Review of essential math, intro to R / RStudio / RMarkdown
The Basics (shortcuts I use all the time)
command | IDE-specific? | Mac | Windows |
---|---|---|---|
copy | no | command + C |
control + C |
cut | no | command + X |
control + X |
paste | no | command + V |
control + V |
undo | no | command + Z |
control + Z |
find | no | command + F |
control + F |
save | no | command + S |
control + S |
run code | RStudio | command + return |
control + return |
Key programming skills in R including data wrangling & viz, writing functions & for loops, algorithm development, documentation, testing and debugging, using git/GitHub
command | IDE-specific? | Mac | Windows |
---|---|---|---|
insert pipe operator | RStudio | command + shift + M |
control + shift + M |
comment/uncomment code (also works when multiple lines are highlighted) |
RStudio | command + shift + C |
control + shift + C |
insert code chunk | RStudio | command + option + I |
control + Alt + I |
return to root directory of an Rproject | RStudio | click on the R cube icon in the top right corner of RStudio’s Files pane | click on the R cube icon in the top right corner of RStudio’s Files pane |
Key programming skills in R including data wrangling & viz, writing functions & for loops, algorithm development, documentation, testing and debugging, using git/GitHub
command | IDE-specific? | Mac | Windows |
---|---|---|---|
select all text | no | command + A |
control + A |
select character-by-character | no | shift + arrow key |
shift + arrow key |
fix indentation of selected code | RStudio | command + I |
control + I |
Introduction to workflows (code, documents, data) for reproducible analyses)
command | IDE-specific? | Mac | Windows |
---|---|---|---|
cycle through previously executed code in reverse chronological order | RStudio console, terminal | up/down arrow keys | up/down arrow keys |
move cursor to beginning of line | no | command + right arrow |
Alt + right arrow |
move cursor to end of line | no | command + left arrow |
Alt + left arrow |
move cursor one word at a time | no | option + left/right arrow |
control + left/right arrow |
Fundamentals of Python programming
Jupyter Notebook Shortcuts (part 1 - executing cells, deleting cells, adding cells)
NOTE: Jupyter Notebooks have a modal user interface, meaning that the keyboard does different things depending on which mode you're in: (1) edit mode (indicated by a green cell border) allows you to type into a cell, (2) command mode (indicated by a gray cell border with a blue left margin) allows you to edit the notebook as a whole, but not type in individual cells.
command | IDE-specific? | Mac | Windows |
---|---|---|---|
run current cell (when in command or edit mode) |
Jupyter Notebook | control (or command ) + return |
control + enter |
run current cell & move cursor to next cell (command or edit mode) |
Jupyter Notebook | shift + return |
shift + enter |
delete cell (when in command mode) | Jupyter Notebook | DD |
DD |
undo delete cell (when in command mode) | Jupyter Notebook | Z |
Z |
add cell above current cell (when in command mode) | Jupyter Notebook | A |
A |
add cell below current cell (when in command mode) | Jupyter Notebook | B |
B |
Fundamentals of Python programming
Jupyter Notebook Shortcuts (part 2 - changing cell modes)
NOTE: Jupyter Notebooks have a modal user interface, meaning that the keyboard does different things depending on which mode you're in: (1) edit mode (indicated by a green cell border) allows you to type into a cell, (2) command mode (indicated by a gray cell border with a blue left margin) allows you to edit the notebook as a whole, but not type in individual cells.
command | IDE-specific? | Mac | Windows |
---|---|---|---|
activate command mode | Jupyter Notebook | esc |
esc |
activate edit mode | Jupyter Notebook | esc |
esc |
change cell to Markdown mode (when in command mode) | Jupyter Notebook | M |
M |
change cell to code mode (when in command mode) | Jupyter Notebook | Y |
Y |
The following classes run concurrently in fall quarter: EDS 220 (Working with Environmental Data), EDS 222 (Statistics for Environmental Data Science), EDS 223 (Geospatial Analysis & Remote Sensing), EDS 242 (Ethics & Bias in Environmental Data Science)
The following classes run concurrently in winter quarter: EDS 232 (Machine Learning in Environmental Data Science), EDS 240 (Data Visualization and Communication), EDS 241 (Environmental Policy Evaluation), EDS 411A (Capstone)
The following classes run concurrently in spring quarter: EDS 213 (Databases and Data Management), EDS 230 (Modeling Environmental Systems), EDS 231 (Text & Sentiment Analysis), EDS 411B (Capstone)
Consider spreading these throughout year (maybe one at a time after summer session?)
command | IDE specific? | Mac | Windows |
---|---|---|---|
look up documentation for highlighted function | RStudio | Fn + F1 |
Fn + F1 |
function creation shortcut | RStudio | highlight arguments > control + option + X |
highlight arguments > control + Alt + X |
assign object to a variable name | RStudio | highlight object > control + option + V |
highlight object > control + Alt + V |
multi-line cursor | RStudio? | Hold option + drag in the direction you want to stretch your cursor |
Hold Alt + drag in the direction you want to stretch your cursor |
run line(s) of code without moving cursor | RStudio | option + return |
alt + enter |
maximize source editor | RStudio | control + shift + 1 |
control + shift + 1 |
maximize console | RStudio | control + shift + 2 |
control + shift + 2 |
return to four pane view | RStudio | control + shift + 0 |
control + shift + 0 |
move cursor to source editor (from elsewhere) | RStudio | control + 1 |
control + 1 |
move cursor to console (from elsewhere) | RStudio | control + 2 |
control + 2 |
restart R | RStudio | command + shift + 0 |
control + shift + (Fn ) + F10 |
move tabs/files (to the right) | no | control + tab |
control + tab |
move tabs/files (to the left) | no | control + shift + tab |
control + shift + tab |
close tab/file | no | command + W |
control + W |
open a new tab | browser | command + T |
control + T |
Added weeklong events to the MEDS google calendar for each week of summer with the following description:
CLICK HERE for the Keyboard Shortcuts of the Week (X)!
What is this??
There are so many keyboard shortcuts, and it can be super overwhelming to learn them all at once. Incorporating a just few new shortcuts a week into your coding practices is a great way build muscle memory :)
Are keyboard shortcuts really worth my time?
- Because both your hands remain on the keyboard, shortcuts are often faster than a mouse
- Yes, learning shortcuts does take some patience and practice, but it will save you time in the long run
- Good news: many keyboard shortcuts are universal, meaning you can use them across a variety applications
- Looking for more shortcuts? Clicking on or hovering over menu items/buttons in many applications will reveal the corresponding keyboard shortcut
- Remember those typing games you played in elementary school to help build muscle memory when learning how to type? They exist for learning keyboard shortcuts too! Check out https://www.shortcutfoo.com/
-------- THIS WEEK'S KEYBOARD SHORTCUTS --------
For Macs:
- X
- Y
- Z
For Windows/PCs:
- X
- Y
- Z
Moved all this to the Wiki, but leaving this issue open in case anyone wants to contribute additional shortcuts
After 2 cohorts, I think that delivering this information all at once is not so helpful (learners forget quickly because they aren't given the time to practice all these keyboard shortcuts).
I'm thinking for next year (starting summer session 2023) to have a "Keyboard shortcut(s) of the week", which are added to the MEDS Google Calendar (on Monday of each week?) and also posted somewhere in the classroom (we have the hexagon cork boards that I still need to hang up, or white boards). Instructors can start lecture each Monday with a reminder of the keyboard shortcuts and encourage students to practice using them throughout that week.
Shortcuts can be generally aligned with whatever is being taught that week (e.g. insert rmd/qmd code chunk during week they learn about reproducible reports in EDS 212, VS Code shortcuts during EDS 217)