For those occasions when you want to clear up your global environment and get rid of all the vectors.

clear_vectors()

Examples

vec <- c(1:3)
ls()
#> [1] "vec"
clear_vectors()
#> Error in which(unlist(eapply(.GlobalEnv, is.vector))): argument to 'which' is not logical
ls()
#> [1] "vec"