library(knitr)
opts_chunk$set(error = TRUE, cache = FALSE)

thefu

Handy corrections for when you fucked up. Inspired by nvbn/thefuck.

Install

devtools::install_github("jakob-r/thefu")

And totally recommended: Run in command line or edit with your favourite text editor:

vi ~/.Rprofile

Change the .Rprofile so that it has the following lines somewhere.

.First = function() {
  if (interactive()) {
    library("thefu")
  }
}

Usage

try(remove.packages("purrr"), silent = TRUE)
library(thefu)

You misspelled an installed package?

library(e1061)
fu()

Thought you already have the package installed?

library(purrr)
fu()
try(remove.packages("randomsearch"), silent = TRUE)

That package you don't know if you have it installed or how it is called exactly?

library(randomserch)
fu(confirm = TRUE)


jakob-r/thefu documentation built on May 24, 2019, 1:33 a.m.