1: In install.packages("tm") :
installation of package ‘slam’ had non-zero exit status
2: In install.packages("tm") :
installation of package ‘tm’ had non-zero exit status
removing ‘/usr/lib64/R/library/slam’
ERROR: dependency ‘slam’ is not available for package ‘tm’
removing ‘/usr/lib64/R/library/tm’
The downloaded source packages are in
‘/tmp/Rtmp3sh53r/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("tm") :
installation of package ‘slam’ had non-zero exit status
2: In install.packages("tm") :
installation of package ‘tm’ had non-zero exit status
There is a problem with your systems configuration, R is not being able to find the gfortran package, how did you install R? did you install r-base-dev?
I don't know the equivalent commands for suse but you could try purging the gfortran package and reinstalling, this would be the command for debian/ubuntu dpkg --purge gfortran; apt-get install gfortran. Also verify if your versions of g++, gcc and gfortran match
Note: Just in case, all this has to be done in the system terminal not in R console.