I just got a new computer with Windows 10 and now can't install packages. I have been looking up on Google/Stack overflow and I am getting the understanding that it is something wrong with the default library. I have tried going into the Control panel and writing a new environment path while also making a new folder for the packages to go into (C:/Program Files/R/Library). I have also gone into the Rprofile site files in both the "etc" and "base" folders and manually changed the default file. One of those has allowed me to at least not get the STRING_ELT() error immediately when I turn it on and have 2 paths for the default library, but I still get an list.files(lib). Please, if someone could help me.
Here are the links I have used and tried all the solutions: How do I change the default library path for R packages https://medium.com/@ValidScience/how-to-fix-rstudios-package-installation-on-windows-10-c1e602bf3a1f
Here is the code in R I have now:
.libPaths()
[1] "C:/Program Files/R/Library" "C:/Program Files/R/R-3.2.2/library"
Error in list.files(.rs.uniqueLibraryPaths(), full.names = TRUE) :
STRING_ELT() can only be applied to a 'character vector', not a 'NULL'
Error in list.files(lib) :
STRING_ELT() can only be applied to a 'character vector', not a 'NULL'
install.packages("readxl")
Error in install.packages : STRING_ELT() can only be applied to a 'character vector', not a 'NULL'