Skip to content

MilesMcBain/nycr_meetup_talk

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

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?

About

That Feeling of Workflowing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published