Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load_nba_schedule() returns a broken data.table object #88

Open
grayskripko opened this issue Sep 8, 2022 · 4 comments
Open

load_nba_schedule() returns a broken data.table object #88

grayskripko opened this issue Sep 8, 2022 · 4 comments

Comments

@grayskripko
Copy link

grayskripko commented Sep 8, 2022

Describe the bug
load_nba_schedule() returns somehow broken data.table object. The object throws an error on tail()

To Reproduce
load_nba_schedule(2019:2022) %>% tail()

Screenshots
image

there as_tibble() removes data.table among the object classes.
UPD: the same problem is found for load_nba_team_box() and load_nba_player_box()

@saiemgilani
Copy link
Collaborator

I cannot say honestly whether this ought to be considered a defect or a documentation error. I am unsure of what exactly is causing conflict but I think you have pinpointed it. I appreciate the note, as a user, I would expect that the tail() should work, so I will need to make some changes to fix.

@grayskripko
Copy link
Author

the easiest solition is not using data.table or remove it as I did in the topic. Where is come from? Do you use some hybrid of data.table and tidyverse?

@saiemgilani
Copy link
Collaborator

The reason many of the functions are so fast is due to the usage of data.table. It isn't an accident that we are using it. I'm not sure if I should do as you've done above or simply update the documentation to indicate it is a data.table object. clarifying*

@grayskripko
Copy link
Author

indicating that this is a data.table object doesn't solve the issue -- the final output object is broken. As a workaround: all user functions may return pure tibble objects but operate as it's faster.
By the way: is it really faster to use data.table? In my experience the difference is negligible for medium size datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants