# insert a timestamp
snippet tst
`r paste("#", date(), "------------------------------------------------\n")`
# load the tidyverse and use the right color scheme
snippet tv
library(tidyverse)
theme_set(theme_bw())
#theme_set(theme_bw(base_size=16) + theme(strip.background = element_blank()))
# initialize an RMarkdown document
snippet initrmd
library(knitr)
opts_chunk\$set(message=FALSE, warning=FALSE, eval=TRUE, echo=TRUE)
# get the length-unique of a vector
snippet lu
length(unique($0))
# start a ggplot
snippet gg
ggplot(${1:data}, aes(${2:aes})) +
geom_${3:geom}()
-
Notifications
You must be signed in to change notification settings - Fork 1
stephenturner/rstudio-snippets
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
My custom RStudio snippets
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published