(.packages()) # maybe just "base"
.packages(all.available = TRUE) # return all available as character vector
require(splines)
(.packages()) # "splines", too
detach("package:splines")
Run the code above in your browser using DataLab