Skip to content

Instantly share code, notes, and snippets.

@nathancday
Created December 25, 2019 16:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nathancday/b7308a40bc7173be6e4191675092f84d to your computer and use it in GitHub Desktop.
Save nathancday/b7308a40bc7173be6e4191675092f84d to your computer and use it in GitHub Desktop.
Open in Rstudio to see a outline demo for organizing your Rscripts
#' ---
#' title: The best title
#' author: You
#' date: 2019-12-25
#' ---
library(magrittr)
library(tidyverse)
# Import ------------------------------------------------------------------
data(mpg)
# * Viz -------------------------------------------------------------------
ggplot(mpg, aes(displ, hwy)) +
geom_point()
# * * Correlation -------------------------------------------------------------
mpg %$%
cor(displ, hwy)
# Functions ---------------------------------------------------------------
top_func <- function() {
sub_func <- function() {}
print("outlines rule!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment