Make R Environment Fresh Again

A simple way to unload none-base packages and remove all global variables.


freshr

CRAN status R CMD CHECK codecov

The goal of freshr is to help you refresh your working environment in Rstudio and create reproducible scripts.

Installation

To install the official CRAN version, run:

install.packages("freshr"")

You can install the development version of freshr like so:

remotes::install_github("shawnlinxl/freshr"")

Example

freshr is meant to be called once at the top of your script. Call it at the top of your main.R script if it is a project with multiple scripts. Source your script and see after the environment is refreshed whether your script contains all the imports and variables needed for it to execute.

Example:

freshr::freshr()

library(ggplot2)
ggplot(mtcars) + geom_point(aes(x = mpg, y = hp))

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("freshr")

1.0.2 by Shawn Lin, 4 years ago


https://github.com/shawnlinxl/freshr


Report a bug at https://github.com/shawnlinxl/freshr/issues


Browse source code at https://github.com/cran/freshr


Authors: Shawn Lin [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests testthat, usethis


See at CRAN