I am trying to install the \"tm\" package but then I get an error saying that \"tm\" is not available for my R version
package ‘tm’ is not available (for R v
You can use the METACRAN mirror:
Go to the blame page of the DESCRIPTION file of the package you're interested in.
E.g. for tm: https://github.com/cran/tm/blame/master/DESCRIPTION
Find the Depends line and click as many times as needed on the View blame prior to this change icon, until an old enough R version is displayed.
If you want to automate that, it may be better to use crandb (also from METACRAN).
Side note: sometimes package authors list R (≥ x.y.z) as a dependency just to be safe because they use version x.y.z and didn't do any tests with previous versions.