The goal of hazmat is to provide a simple way for educators, and other folks that need to run a lot of other people’s code, to have some confidence that there aren’t any unexpected scary R snippets.
This package was motivated by this exchange on twitter.
# install.packages("devtools")
devtools::install_github("actuarialvoodoo/hazmat")
Currently, hazmat supports searching individual files or all R/Rmd files in a folder for the following hazardous code snippets:
library(hazmat)
## basic example code
screen_folder("examples")
#> == File: examples/test_file.R ==
#> 🔥 4: rm(ls = ls())
#> 🔔 8: system('pwd')
Please note that the ‘hazmat’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.