All Projects → MilesMcBain → nycr_meetup_talk

MilesMcBain / nycr_meetup_talk

Licence: other
That Feeling of Workflowing

nycr_meetup_talk

That Feeling of Workflowing 20200810

Demo Stuff

Keybindings

rstudio_bindings.json

in ~/.R/rstudio/keybindings/rstudio_bindings.json:

{
    "activateTerminal": "Ctrl+3",
    "insertAssignmentOperator": "Ctrl+'",
    "insertPipeOperator": "Ctrl+Shift+'",
    "goToDefinition": "Ctrl+Shift+J"
}

addins.json

in ~/.R/rstudio/keybindings/addins.json:

{
    "fnmate::rs_fnmate": "Ctrl+Shift+F",
    "drake::rs_addin_r_make": "Ctrl+M",
    "drake::rs_addin_loadd": "Ctrl+L",
    "shrtcts::shortcut_01": "Ctrl+P",
    "shrtcts::shortcut_02": "Ctrl+Shift+O",
    "shrtcts::shortcut_03": "Ctrl+T"
}

shrcts.yaml

using {shrtcts}.

in ~/shrtcts.yml:

- Name: Source ./packages.R
  Binding: |
    cat(glue::glue('> source(\"./packages.R\")\n\n'))
    source("./packages.R")
  Interactive: true
- Name: Output symbol at cursor
  Binding: |
    target <- mmmisc::rs_get_symbol_at_cursor(rstudioapi::getActiveDocumentContext())
    cat(glue::glue("> {target}\n\n"))
    eval(as.symbol(target))
  Interactive: true
- Name: Thead at symbol at cursor
  Binding: |
    target <- mmmisc::rs_get_symbol_at_cursor(rstudioapi::getActiveDocumentContext())
    eval(parse(text = glue::glue("t(head({target}))")))
  Interactive: true

QA Stuff:

Building comfort with writing functions by forcing yourself to do it more often would be a great stepping stone to a workflow like this.

Anyone know any good resources for learning how to make R functions?

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].