1

I have small package of functions called bfuncs. When I run devtools::check() in RStudio I get the following error:

==> devtools::check()

Updating bfuncs documentation
Loading bfuncs
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'flextable' not available.
Error: Dependency package(s) 'flextable' not available.
Execution halted

Exited with status 1.

Flextable is listed under Imports: in my package DESCRIPTION file.

Flextable is installed on my machine and I'm using it interactively without any problems. I've tried reinstalling in the manner shown here.

These posts seem to sort of relate to my problem, but I wasn't able to get a solution from them: Package imports error on devtools::check()
Dependency package "package_name" not available
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?

In response to @MrFlick, installed.packages()["flextable","Version”] returns ”0.4.6”. Yes, devtools and flexible are installed on the same machine and that is the machine I’m running devtools::check() on. The version of devtools I’m using is ”2.0.1”.

Any help getting rid of this error is appreciated.

Brad Cannell
  • 3,020
  • 2
  • 23
  • 39
  • So what does `installed.packages()["flextable","Version"]`return? Are you are calling `devtools::check` on the same machine? What version of `devtools` are you using? – MrFlick Dec 06 '18 at 16:45
  • @brad-cannell I think I found your repo and package `flextable` is not listed in `Imports:` – David Gohel Dec 06 '18 at 21:33
  • Hi @DavidGohel. Thanks for taking a look. You're right it's not on Github, because adding flextable to Imports in my description file causes the error above to be thrown. I was trying to resolve the error before committing to Github. Does that make sense? – Brad Cannell Dec 06 '18 at 21:36
  • @BradCannell Maybe you have a local issue... I added flextable to `imports:`, added `#' @import flextable` somewhere in your scripts and voila, your package checks ok: `0 errors ✔ | 0 warnings ✔ | 0 notes ✔`. If it is what you did, I can not reproduce :/ – David Gohel Dec 06 '18 at 23:05
  • @DavidGohel Thanks! I appreciate you trying so hard to figure it out. – Brad Cannell Dec 06 '18 at 23:21

1 Answers1

0

I don't know exactly why, but reinstalling XQuartz seems to have fixed the issue.

Brad Cannell
  • 3,020
  • 2
  • 23
  • 39