Updating the answer for 2025 and R version 4.4.0 and above, there is now a native function use() that allows you to do this.
use()
use("gdata", "trim")
I came across this post looking for information on use(), so thought it might be useful for others.