While working on the #tidyTuesday week 5 2020 challenge San Francisco Trees I needed to plot data. Having not previously worked with maps in R, I had to start here. I found Eric C. Anderson's book useful to get me started.
Custom Themes in RStudio
To customize your own theme in RStudio use the online ththeme editor. Customize the items you want. Then download the xml file. The default file is in .txt extension. Just rename it with a .tmtheme extension. Then import it to RStudio using this procedure.
Installing an R Package if Required
When you have serveral packages for your code and you dont know which are already installed a good way to do this programatically is as follows. list.of.packages <- c("package1", "package2", "package3")new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]if(length(new.packages)) install.packages(new.packages) Referenced from here.
r Package Install Error ‘unable to move temporary installation’
When installing the 'rgdal' package I got the error package ‘rgdal’ successfully unpacked and MD5 sums checkedWarning in install.packages :unable to move temporary installation It seems the antivirus software is delaying the install. The workaround is to slow it down by the following: debug(utils:::unpackPkgZip)install.packages("packageName") Then just keep hitting the 'Next' button to execute the next … Continue reading r Package Install Error ‘unable to move temporary installation’