Getting Error in RStudio while loading a package- 'tm' I've installed the R package tm. Now I am trying to load it, but it's giving me this error and warning everytime, I try. 

The package is in this location- 

‘C:/Users/Google/Documents/R/win-library/3.3’


Error Message--

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘slam’
In addition: Warning message:
package ‘tm’ was built under R version 3.3.1 
Error: package or namespace load failed for ‘tm’


Any thoughts?
This is a dependency error. You're just missing one of the packages that tm assumes you have.

One solution is to simply directly install that package:

install.packages("slam")


another is to use a package manager that takes care of this for you:

install.packages("pacman")
pacman::p_load(tm)