Skip to content

Instantly share code, notes, and snippets.

View isteves's full-sized avatar

Irene Steves isteves

View GitHub Profile
@isteves
isteves / sql_chunks.Rmd
Last active February 13, 2022 14:00
SQL chunks in RMarkdown
---
title: "SQL chunks in Rmd"
output: html_document
editor_options:
chunk_output_type: inline
---
## Set up the database table
```{r setup, message = FALSE}
@isteves
isteves / rmd_snippets.md
Last active May 14, 2020 12:54
Useful Rmd snippets

Preferred YAML header:

---
title: My title
subtitle: My subtitle
author: My name
date: "`r Sys.Date()`"
output:
 html_document:
@isteves
isteves / tidyselect.md
Last active May 4, 2020 15:28
Trying to grok tidyselect

Trying to grok tidyselect

Key takeaways:

  • everything inside vars(...) is exactly the same as the stuff inside select(...)!!!
  • vars() is used for all scoped variants of dplyr verbs (I assume bc the variables need to “fit” into a single argument, .vars. In select(...), the ellipses take everything)
  • vars_select() is probably more of a developer-facing function (seen in select_helpers documentation)

Some "gotchas":

@isteves
isteves / partyparrotR.Rmd
Created August 8, 2018 22:26
party parrot
party parrot
@isteves
isteves / whichtip.Rmd
Last active July 26, 2018 20:31
Rendering markdown text
---
output:
html_document:
df_print: paged
runtime: shiny
---
```{r include = FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
@isteves
isteves / command_line_python.Rmd
Last active February 15, 2018 18:59
Intro to Python and the Command Line for an R User
---
title: "Intro to Python and the Command Line for an R User"
author: "Irene Steves"
date: "`r format(Sys.Date())`"
output: github_document
---
Some things are just faster on the command line. But if you're not used to it, the command line is a dark and scary place. Thankfully, I had [amoeba](https://github.com/amoeba) to help me through:
1. Copying a file to another folder