0

I'm trying to downgrade the package version of officer that I have from the most recent (v 0.3.12) to v 0.3.8.

I tried running the below lines, all of which failed:

What am I doing wrong?


    require(devtools)
    install_version("officer", version = "0.3.8")
    ---Error: Failed to install 'unknown package' from URL:
      (converted from warning) package ‘officer’ is in use and will not be installed
    
    require(devtools)
    install_version("officer", version = "0.3.8", repos = "https://cran.r-project.org/web/packages/officer/index.html")
    --- cannot open URL 'https://cran.r-project.org/web/packages/officer/index.html/src/contrib/PACKAGES'
    Error in package_find_repo(package, repos) : 
      could not find package 'officer'
    
    require(devtools)
    install_version("officer", version = "0.3.8", repos = "https://davidgohel.github.io/officer/") 
    ---  cannot open URL 'https://davidgohel.github.io/officer/src/contrib/PACKAGES'
    Error in package_find_repo(package, repos) : 
      could not find package 'officer'
    
    library(devtools)
    devtools::install_github(davidgohel/officer, ref = "officer_0.3.8")
    ---Error in lapply(repo, github_remote, ref = ref, subdir = subdir, auth_token = auth_token,  : 
      object 'davidgohel' not found
    
    devtools::install_github("davidgohel/officer", ref = "0.3.8")
    ---Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
      cannot open URL 'https://api.github.com/repos/davidgohel/officer/tarball/0.3.8

Phil
  • 7,287
  • 3
  • 36
  • 66
gabby
  • 11
  • 3
  • Download from CRAN: https://cran.r-project.org/src/contrib/Archive/officer/ Then use `install.packages`. Make sure that the package is not loaded (maybe restart R). – Roland Jul 16 '20 at 14:20
  • @Roland, following your directions, I saved the correct package version in the same location I have all of my R packages. I then successfully installed the officer package into my environment ,and was able to see the correct version number when I checked the version. When actually running code to use this package, I get the following error: Error: package or namespace load failed for ‘officer’ in get(method, envir = home): lazy-load database 'D:/Users/awsinsights.ghummel/Documents/R/win-library/4.0/officer/R/officer.rdb' is corrupt – gabby Jul 16 '20 at 15:03
  • How did you install it? – Roland Jul 16 '20 at 19:36

0 Answers0