snippet doc
#' ${1:Title}
#'
#' ${2:Description}
#'
#' ${3:Description text}
#'
#' @param $4
#' @return $5
#' @export
#' @examples
#' $6

endsnippet

snippet fun
function($1)
{
  $2
}

endsnippet

snippet if
if ($1)
{
  $2
}

endsnippet

snippet ifelse
ifelse($1, $2, $3)
endsnippet

snippet case
case_when($1 ~ $2,
          $3 ~ $4,
          ${5:T} ~ $6)

endsnippet

snippet lib
library(${1:tidyverse})

endsnippet
