Giter Club home page Giter Club logo

Comments (3)

steve-s avatar steve-s commented on August 16, 2024

Hello Ken,

thanks for the report. I can confirm that FastR indeed doesn't implement pos.to.env and we will get that fixed.

from fastr.

kenahoo avatar kenahoo commented on August 16, 2024

Thanks, Steve.

I should also say that somehow after doing various other stuff in my session, that command pkgname <- 'R.oo'; pkg <- get(pkgname, envir = getNamespace(pkgname)) actually started running without error (though I don't know whether it actually succeeded), not sure what's going on there. When I restarted the session it went back to the failure behavior.

from fastr.

steve-s avatar steve-s commented on August 16, 2024

Hi Ken,

pos.to.env is implemented and we've also fixed one more issue that popped up during R.oo installation. The merge for the reference is 8364678

Note that this will propagate to the next public release. If you want to try the fixes now, you can use the community provided Dockerfile: https://github.com/nuest/fastr-docker

I've had some issues with running the R.oo tests, but I tried the sample below taken from the docs and it seems to work fine. Please, let us know if you find any other issues.

setConstructorS3("MyDouble", function(value=0, ...) {
  extend(as.double(value), "MyDouble", ...)
})
setMethodS3("as.character", "MyDouble", function(object, ...) {
  fmtstr <- attr(object, "fmtstr")
  if (is.null(fmtstr))
    fmtstr <- "%.6f"
  sprintf(fmtstr, object)
})
setMethodS3("print", "MyDouble", function(object, ...) {
  print(as.character(object), ...)
})
x <- MyDouble(3.1415926)
print(x)
x <- MyDouble(3.1415926, fmtstr="%3.2f")
print(x)
attr(x, "fmtstr") <- "%e"
print(x)

from fastr.

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.