Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning in install.packages : cannot remove prior installation of package ‘data.table’ [duplicate]

Tags:

r

data.table

I tried to install package data.table in R. This error showed up. Could anyone resolve this?

like image 289
Punya Swaroop Avatar asked Jan 29 '17 07:01

Punya Swaroop


Video Answer


2 Answers

I assume you're on Windows. You may have data.table loaded into your session already; on Windows, dlls that are part of a package can't be unloaded until R shuts down. So restart R and then try running install.packages again.

like image 130
Hong Ooi Avatar answered Sep 22 '22 12:09

Hong Ooi


Try running R with admin access (sudo in Linux, or for Windows, right click and choose "Run as Administrator"). I had the same problem when running R from PowerShell in Windows, and this fixed it.

like image 32
Eric Avatar answered Sep 20 '22 12:09

Eric