GithubHelp home page GithubHelp logo

Fail to preserve Date object about dt HOT 5 CLOSED

rstudio avatar rstudio commented on June 29, 2024
Fail to preserve Date object

from dt.

Comments (5)

yihui avatar yihui commented on June 29, 2024

That is a problem of RJSONIO. Sigh. It seems every single problem of RJSONIO has been well solved in jsonlite, but we are just stuck in RJSONIO:

> x = data.frame(date = seq(as.Date("2015-01-01"), by = "day", length.out = 5), x = 1:5)
> RJSONIO::toJSON(x)
[1] "{\n \"date\": [ 16436, 16437, 16438, 16439, 16440 ],\n\"x\": [ 1, 2, 3, 4, 5 ] \n}"
> jsonlite::toJSON(x)
[{"date":"2015-01-01","x":1},{"date":"2015-01-02","x":2},{"date":"2015-01-03","x":3},{"date":"2015-01-04","x":4},{"date":"2015-01-05","x":5}] 

from dt.

juancentro avatar juancentro commented on June 29, 2024

@yihui are you in the middle of solving this? I just installed the latest DT and when a DT has date columns it doesn't print anything
datatable(data.frame(x = Sys.Date()))

from dt.

jcheng5 avatar jcheng5 commented on June 29, 2024

duncantl/RJSONIO#3

:(

from dt.

yihui avatar yihui commented on June 29, 2024

Should be "fixed" now. Thanks!

from dt.

renkun-ken avatar renkun-ken commented on June 29, 2024

Appreciate your work! Will try it out.

from dt.

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.