Getting Error in RStudio while loading a package- 'tm'
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)