On my Windows 10 (fully updated) desktops, my update of the OpenMx and maptools packages failed in both RStudio ( 1.4.1717) and native R (4.1.1) with the same error messages:
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
Error in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
'maptools' is not a valid installed package
Error: loading failed
Execution halted
*** arch - x64
Error in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
'maptools' is not a valid installed package
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
- removing 'R:/Home/R/library/4.1/maptools'
Warning in unlink(pkgdir, recursive = TRUE) :
cannot get info on 'R:/Home/R/library/4.1/maptools/Meta', reason 'The system cannot find the file specified'- restoring previous 'R:/Home/R/library/4.1/maptools'
I have the same problem exactly trying to update OpenMx and maptools. In both cases the compilation went without error as did the " byte-compile and prepare package for lazy loading" and "*** installing help indices." Evidently "testing if installed package can be loaded from temporary location" also succeeded, but the "testing if installed package can be loaded from final location" failed. I would suspect that this might be a permissions problem, but it is only these two packages (maptools and OpenMx) that have failed to update. For what it's worth, these updates both worked correctly on my Ubuntu 20.04 LT desktop.
Usually an OpenMx compiled update for Windows is available within a few days, but it has now been 5 days since the source version became available. I'm not sure whether maptools will also become available as a compiled package. So I'm not sure whether this is a problem with the packages or with my setup. But as I noted above, these are the only two package updates that have failed.
Thanks in advance for any suggestions to resolve this problem.
Larry Hunsicker