Skip to content

Instantly share code, notes, and snippets.

@RobertoChiosa
Last active August 27, 2023 13:24
Show Gist options
  • Select an option

  • Save RobertoChiosa/84b285cb7938e81d95e0953e577c10a8 to your computer and use it in GitHub Desktop.

Select an option

Save RobertoChiosa/84b285cb7938e81d95e0953e577c10a8 to your computer and use it in GitHub Desktop.
R script header snippet
snippet header
# HEADER --------------------------------------------
#
# Author: Name Surname
# Copyright Copyright `r format(Sys.Date(), "%Y")` - Name Surname
# Email: yourmail@example.com
#
# Date: `r Sys.Date()`
#
# Script Name: `r rstudioapi::getSourceEditorContext()$path`
#
# Script Description:
#
#
# SETUP ------------------------------------
cat("\014") # Clears the console
rm(list = ls()) # Remove all variables of the work space
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment