The small part of the error message you are showing is asking you to update the xfun package
install.packages("xfun")
Also, you are using a very old R version so you are going to be forced to install packages from source, which requires compilation and it is much more prone to installation problems. I would strongly recommend updating your R version.
If this doesn't solve your problem, please post the complete error message you get as formatted code (screenshots are considered a bad practice here).
Thank you @andresrcs
I reinstalled the newest version of R, Rtools and RStudio and got it to work after a while.
The package "xfun" and is working fine, I still have not been able to get tinytex package to work in order to knit a Rmd file as a pdf.
Thanks for the help and I will keep in mind the good practice you mentioned.