GithubHelp home page GithubHelp logo

Comments (7)

rempsyc avatar rempsyc commented on June 3, 2024

For future reference could you provide a reprex to show current behaviour? Thanks!

from report.

strengejacke avatar strengejacke commented on June 3, 2024

For now, we treat them as factors:

set.seed(123)
x <- sample(seq(as.Date("1999/01/01"), as.Date("1999/01/05"), by = "day"), 30, replace = TRUE)
report::report(x)
#> x: 5 levels, namely 1999-01-01 (n = 6, 20.00%), 1999-01-02 (n = 6, 20.00%),
#> 1999-01-03 (n = 9, 30.00%), 1999-01-04 (n = 4, 13.33%) and 1999-01-05 (n = 5,
#> 16.67%)

Created on 2023-06-14 with reprex v2.0.2

from report.

Chinca-lang avatar Chinca-lang commented on June 3, 2024

dear all, sorry for not being clear before. Let me know if this code can clarify the issue. I've just used the first two variable of my df.

str(example1)
'data.frame': 572 obs. of 2 variables:
$ ID : Factor w/ 26 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
$ date: Date, format: "2020-08-03" "2020-08-25" ...

and if I summarise it is:

summary(example1)
ID date
1 : 22 Min. :2020-08-03
2 : 22 1st Qu.:2021-02-08
3 : 22 Median :2021-07-05
4 : 22 Mean :2021-06-24
5 : 22 3rd Qu.:2021-11-29
6 : 22 Max. :2022-05-26
(Other):440

If I call report I get this message:

report::report(example1)
Error: Oops, objects of class [Date] are not supported (yet) by report_table() :(

Want to help? Check out https://easystats.github.io/report/articles/new_models.html

Thanks for your support!

from report.

strengejacke avatar strengejacke commented on June 3, 2024

One of your suggestions was treating dates like factors, which is what report now does with the recent commits. We could also change the behaviour to something else, but I rarely work with dates, so I'm not sure what's the most appropriate way to report date-variables.

from report.

Chinca-lang avatar Chinca-lang commented on June 3, 2024

cool, thanks a lot for your work!
I didn't understandbbefore because for some reason it seems not working on my version report_0.5.7
I've tried to reproduce your code:

set.seed(123)
x <- sample(seq(as.Date("1999/01/01"), as.Date("1999/01/05"), by = "day"), 30, replace = TRUE)
report::report(x)
Error: Oops, objects of class [Date] are not supported (yet) by report() :(
Want to help? Check out https://easystats.github.io/report/articles/new_models.html

I've checkd x and it is:

str(x)
Date[1:30], format: "1999-01-03" "1999-01-03" "1999-01-02" "1999-01-02" "1999-01-03" "1999-01-05" "1999-01-04" ...

do you have any suggestion?

from report.

strengejacke avatar strengejacke commented on June 3, 2024

For now, it's only available in the GitHub version of report. You can install it, after installing the easyverse package, by running easystats::install_latest().

from report.

Chinca-lang avatar Chinca-lang commented on June 3, 2024

awesome! thanks a lot

from report.

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.