0

Say I want to install dev version of data.table, the recommended command is:

remove.packages("data.table")
install.packages("data.table", type = "source",
    repos = "http://Rdatatable.github.io/data.table")

My question is: Is it necessary to remove the currently installed version first? Is there any danger if I install the new version without removing exisiting version?

mt1022
  • 16,834
  • 5
  • 48
  • 71
  • Have you tried it? This seems to be a dupe of [this](https://stackoverflow.com/questions/2988559/how-do-you-use-multiple-versions-of-the-same-r-package) – David Arenburg Jun 06 '17 at 08:13
  • @DavidArenburg, my question is not about install multiple versions of the same package at the same time. A single installation is fine for me. I usually just install the new version (overwrite the old version) without removing the old one with `remove.package` first. I wonder whether it is safe to do so. – mt1022 Jun 06 '17 at 08:25
  • I was warrying that the after new installation in the same dir, whether some relics of the old version in the same might be in conflict with the new installation. – mt1022 Jun 06 '17 at 08:42

1 Answers1

1

If you install a package into the default library, a new version completely replaces the old version. You don't need to remove the old version manually.

Of course, this requires the package to not be loaded when you install the new version.

Roland
  • 127,288
  • 10
  • 191
  • 288