Code Monkey home page Code Monkey logo

Comments (5)

vertesy avatar vertesy commented on July 20, 2024

same with sort.decreasing()

from codeandroll2.

vertesy avatar vertesy commented on July 20, 2024

These functions appear to be hidden for some reason

CodeAndRoll2:::sort.decreasing() and CodeAndRoll2:::any.duplicated() works

from codeandroll2.

vertesy avatar vertesy commented on July 20, 2024
  • Namespace is weird
# Generated by roxygen2: do not edit by hand

S3method(any,duplicated)
S3method(any,duplicated.rownames.ls.of.df)
S3method(as.character,wNames)
S3method(as.list,df.by.col)
S3method(as.list,df.by.row)
S3method(as.logical,wNames)
S3method(as.numeric,wNames)
S3method(na.omit,mat)
S3method(na.omit,strip)
S3method(range,list)
S3method(reorder,list)
S3method(sort,decreasing)
S3method(sort,mat)
export(MaxN)
export(TPM_normalize)
export(arr.of.lists.2.df)
export(array.fromNames)
export(as.factor.numeric)
  • why are some functions listed as S3method and some as export in R?

from codeandroll2.

vertesy avatar vertesy commented on July 20, 2024

So its a problem triggered by Roxygen3

https://stackoverflow.com/questions/18512528/how-to-export-s3-method-so-it-is-available-in-namespace

Just for those late to the party, in the newer versions of roxygen (=> 3.0), the @export tag will work automatically how to deal with methods.

From the Generating Rd files vignette:

S3 generics are regular functions, so document them as such. S3 classes have no formal definition, so document the constructor function. It is your choice whether or not to document S3 methods. You don’t need to document methods for simple generics like print(). If your method is more complicated, you should document it so people know what the parameters do. In base R, you can find documentation for more complex methods like predict.lm(), predict.glm(), and anova.glm().

Older versions of roxygen required explicit @method generic class tags for all S3 methods. From 3.0.0 this is no longer needed as and roxygen2 will figure it out automatically. If you are upgrading, make sure to remove these old tags. Automatic method detection will only fail if the generic and class are ambiguous. For example is all.equal.data.frame() the equal.data.frame method for all, or the data.frame method for all.equal?. If this happens, you can disambiguate with (e.g.) @method all.equal data.frame.

from codeandroll2.

vertesy avatar vertesy commented on July 20, 2024

I am not fully understanding why this is happening now, but an explicit #' @export sort.decreasing solves the problem

from codeandroll2.

Related Issues (10)

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.