Sunday, February 16, 2020

Installing papaja on Windows 10

I recently bought a Windows 10 2-in-1 machine (Dell Latitude) so that I could record my video lectures for class and write on the tablet while recording. I usually use Mac OS or Ubuntu. I haven't used Windows since maybe 2008.

One thing I needed was to install is papaja in RStudio. This turned out to be a nightmare. I kept getting all kinds of unfamiliar error messages which I had never seen before. 

The problem turned out to be that Windows stores the packages in a library but is unable to delete them when a newer version has to be installed. You have to:

1. Change directory to the library location, which in my case was C:/Users/vasishth/Documents/R/win-library/3-6. I don't know if Windows has a terminal, but I changed the directory in the Windows Finder-equivalent window.
2.  Then, manually delete the packages that R complains about when installing papaja.
3. Restart RStudio, and then use install.packages to install all the offending packages. You may first have to remove a file called 00_Lock* or something in the directory equivalent to the one above on your machine.
4. Now, you can install papaja from the stable or development version as usual.
5. Restart RStudio and papaja will be present in the templates.