Error in loadNamespace(name) : there is no package called ‘yaml’

Yaml packages were installed incorrectly, whether I downloaded zip from Cran to install locally, or install.packages(” YAML “) were installed, or displayed

Warning in install.packages :
  package ‘yaml’ is not available (for R version 3.5.3)

Either it shows that
cannot be installed on the search site, and there is finally a work method
1) first type.libpaths (), which will pop up the folder path of the Library where we installed the R package
2) enter this path, remove the original folder of yaml package
3) and restart Rstudio, enter the following code:

install.packages("yaml", dependencies=TRUE, repos='')

Installation successful!!
reference n-x-y-z-wa

Read More: