Hello,
Happy to help if you can provide more detail. It sounds as if the library associated with function qtm cannot be found. I am assuming this is from the tmap package so will need to install and add the library call:
install.packages("tmap")
library(tmap)