7

I am trying to document a new R project using roxygen2. I am using roxygen2 version 6.1.1 and desc version 1.2.0.

I have tried both the commands roxygen2::roxygenise() and devtools::document() but in both cases I am getting the same error:

Updating documentation 
First time using roxygen2. Upgrading automatically... 
Error in if (any(mismatch <- res != res2)) { : missing value where TRUE/FALSE needed

I have looked at the following issue: roxygen new project issue and tried following the advice of reinstalling both roxygen and desc to no avail.

Any help would be appreciated

mattyx17
  • 806
  • 6
  • 11
  • It's telling you that you have an error in your code. You likely need to change that line to `if (any(res != res2))`, but I don't have the full code so can't be completely sure. After you fix the error (and others that may pop up) it will let you continue. – rpolicastro May 19 '20 at 22:35
  • @rpolicastro That is the roxygen2 code not mine. See the second last comment on the link in the question. That user got the same error – mattyx17 May 19 '20 at 23:30

1 Answers1

6

Check for blank lines in your DESCRIPTION file.

Authors@R: 
    person(given = "First",
           family = "Last",
           role = c("aut", "cre"),
           email = "first.last@example.com",
           comment = c(ORCID = "YOUR-ORCID-ID"))
                                                       <- this line is blank, remove!
Description: What the package does (one paragraph).

That solved the problem for me.

qasta
  • 1,081
  • 7
  • 6