Search code examples
rplotkml

How to Fix error loading plotKML package in R


During the installation I had no problem, I need to use this package but when loading it I have an error that does not allow me to use it properly

I have already tried the restart R trick but this persists; below the error:

> library(plotKML)
#Error: package or namespace load failed for ‘plotKML’ in get(Info[i, 1], envir = env):
#lazy-load database 'C:/Users/User/Documents/R/win-library/4.1/e1071/R/e1071.rdb' is corrupt
#In addition: Warning message:
#In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

I was using R version 4.1.0 and update to 4.1.1 in order to solve this but the problem persists the platform is: i386-w64-mingw32 / i386 (32-bit)

I do it through Rstudio Version 1.0.153

Any idea how to fix it?

I am new at this :)


Solution

  • Dave2e thanks for your comentary, it really worked, only it gave me 2 errors similar to the one presented in the question and consecutive after reinstalling the package e1071:

    #lazy-load database'C:/Users/User/Documents/R/win-library/4.1/aqp/R/aqp.rdb' is corrupt'
    
    #lazy-load database'C:/Users/User/Documents/R/win-library/4.1/gstat/R/gstat.rdb' is corrupt'
    

    sorry I did not copy the complete code as I was amused to find a way forward. and I'm sure the error lines on the console weren't 100% the same

    to which, under the same logic, reinstall the "aqp" and "gstat" packages , restarting Rstudio between each installation, since when trying to load the plotKML package immediately in the same session the error persists

    here the victory:

    > library(plotKML)
    plotKML version 0.8-1 (2021-04-12)
    URL: https://github.com/Envirometrix/plotKML/
    Warning message:
    R graphics engine version 14 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.