Giter Club home page Giter Club logo

Comments (6)

PierreENOlivier avatar PierreENOlivier commented on July 16, 2024

Same issue here and I can't tell from the error which S3 method is missing a tag.

from roxygen2.

venpopov avatar venpopov commented on July 16, 2024

I got the same issue, but no methods were missing tags. Restarting the R session made it go away...

from roxygen2.

PierreENOlivier avatar PierreENOlivier commented on July 16, 2024

I got the same issue, but no methods were missing tags. Restarting the R session made it go away...

I restarted several times and it did not work. And then, did some work, restarted and it magically stopped throwing errors.
In the meantime, I tried to install the fortran compiler that seemed to be missing. Maybe that fixed it.

from roxygen2.

GegznaV avatar GegznaV commented on July 16, 2024

The same issue is on GitHub Actions. How to solve it? Use the previous version of Roxygen2 where the issue was not present?

from roxygen2.

andrew-schulman avatar andrew-schulman commented on July 16, 2024

Yes, you can work around it by reverting to roxygen2 version 7.2.3. Or, you can give up and add @export tags (that you probably don't want) to the functions that are missing them. You can tell which functions those are from the error message. The line that says With name: tells you the name of the function that triggered the error.

from roxygen2.

venpopov avatar venpopov commented on July 16, 2024

I just figured out when this happens for me. If I have a breakpoint setup inside a method, and I run document(), the above error would appear. Removing the breakpoint removes the error. There may be multiple causes of the same error, but this is what was causing it for me.

Reproducible example:

#' @export
summary.myclass <- function(object) {
  cat("This is a summary of myclass\n")
}

running document() produces no errors. However, if I have a breakpoint setup within the Rstudio gui:

image

and I run document() I get this error:

Error in `map2()`:In index: 1.With name: summary.myclass.
Caused by error in `basename()`:
! a character vector argument expected
Run `rlang::last_trace()` to see where the error occurred.
Warning message:
In class(f) <- c("s3method", "function") :
  Setting class(x) to multiple strings ("s3method", "function", ...); result will no longer be an S4 object  

from roxygen2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.