Unable to install maps package



Hello everyone,

I'm relatively new to coding so I'm sorry for any information I may leave out here. I had the maps package in R yesterday and this morning it's not working, so I attempted to reinstall and got the below error message:

Warning in install.packages :
cannot remove prior installation of package ‘maps’

I've seen this type of error in the past and tried to add a type (binary and source) to the end and it did not solve the problem. Also tried with dependencies true and false and still nothing.

Anybody have any advice for this situation?


The first thing that comes to mind is insufficient user rights. Do you have full access/admin rights to the folders in your .libPaths()?

Did you save your workspace? It's possible maps is attached, and, as a result, you can't uninstall it. What happens if you open a fresh session and run remove.packages("maps")?

This StackOverflow answer might also be of help:


Found a random R session running in the background and forcing that to quit solved the problem.

Thanks! :slight_smile: