2

I load an old .RData, this prints in the console:

Loading required package: Error in .requirePackage(package) : unable to find required package ‘’ In addition: Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘’

I wish I could provide a reproducible example but I have no clue how/why loading the RData file prompts requiring the package... Can someone please shed some light?

elred
  • 21
  • 5
  • The documentation on the [serialization format](https://cran.r-project.org/doc/manuals/r-release/R-ints.html#Serialization-Formats) notes that "Serialization in R needs to take into account that objects may contain references to environments, which then have enclosing environments and so on. (Environments recognized as package or name space environments are saved by name.)". So it's likely that there's a object in that Rdata file that was created with that package and thus needs that package to properly work again. – MrFlick Aug 02 '22 at 13:21
  • a simple case where this happens is if the .RData file contains an object of a class that is defined in a package (as @MrFlick explains, the object looks for this class definition in a package environment). ROracle defines several classes (the driver, connection and result) for compatibility with DBI; I am guessing your .RData file contains an object of the `ROracle::OraResult` class. – Ottie Aug 02 '22 at 13:46
  • makes sense; I tracked it down; many thanks @MrFlick – elred Aug 02 '22 at 13:59

0 Answers0