pivoy_longer() is a new function, you have to update tidyr in order to get it.
install.packages("tidyr")
Also, as a side note, it seems like you are using a quite old R version, it would make things easier for you if you update it as well, current is version is 3.6.2.
It is asking you to update rlang package since it is a package dependency for tidyr, try restarting your R session and updating rlang first and then tidyr.
install.packages("rlang")
And as I said before, package installation would be much easier for you if you update R to the latest version, because you would have access to binary versions to avoid compiling.
Sorry I don't understand what you mean, it doesn't make much sense, RStudio is an IDE for the R programming language, but they are two independent pieces of software, each one can have independent versions.
The error message above is telling you that you need to update R (not RStudio) in order to install the latest rlang version, and you need that to update tidyr
Ohhh, I see (sorry coding was not one of my strong suits as a undergrad)
I updated the version, through the link you attached. I will re-start the R session hopefully that will work!