Flextable install keeps failing

Hi
I cannot install Flextable package after trying on two PC. The install dependencies checkbox was ticked. Here is what I get. Please could you tell me what to do.

install.packages("flextable", lib="C:/Program Files/R/R-3.4.3/library")

There is a binary version available but the source version is later:
binary source needs_compilation
flextable 0.5.2 0.5.4 FALSE

installing the source package ‘flextable’

trying URL 'https://cran.rstudio.com/src/contrib/flextable_0.5.4.tar.gz'
Content type 'application/x-gzip' length 294371 bytes (287 KB)
downloaded 287 KB

  • installing source package 'flextable' ...
    ** package 'flextable' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
    there is no package called 'zip'
    ERROR: lazy loading failed for package 'flextable'
  • removing 'C:/Program Files/R/R-3.4.3/library/flextable'
    In R CMD INSTALL
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.4.3\library" C:\Users\RUPERT~1.KEN\AppData\Local\Temp\RtmpAdaEQO/downloaded_packages/flextable_0.5.4.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘flextable’ had non-zero exit status

Have you tried manually installing the missing dependency first?

install.packages('zip') 

Sorry I should have mentioned I did try to install that. But the zip package doesnt install either.

What error message do you get while trying to install zip package?

No error message . It just saves in a directory.

Are you sure? Absolutely no message at all?
You are not giving us too much information to work with.

One more thing to try, if you don't need the latest version of flextable, is installing the binary version instead of compiling from source.

I retried and both zip and flextable now install.

Many thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.