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

Internal generic lengths.sq does not dispatch properly #21

Open
DominikRafacz opened this issue Aug 5, 2020 · 4 comments
Open

Internal generic lengths.sq does not dispatch properly #21

DominikRafacz opened this issue Aug 5, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@DominikRafacz
Copy link
Collaborator

Calling lengths(sq) results in calling default implementation of lengths instead of method lengths.sq. lengths is not a common generic function, but an internal generic, which may be the reason why it fails to work correctly.

@DominikRafacz DominikRafacz self-assigned this Aug 5, 2020
@DominikRafacz DominikRafacz added the bug Something isn't working label Aug 5, 2020
@DominikRafacz DominikRafacz added this to To Do (high priority) in tidysq 1.0 via automation Aug 5, 2020
@DominikRafacz DominikRafacz moved this from To Do (high priority) to To Do (low priority) in tidysq 1.0 Aug 5, 2020
@DominikRafacz
Copy link
Collaborator Author

The reason for it is simple: lengths is, indeed, internal generic method, but in S4, not S3. S4 method should be written in order to reach expected behaviour.

@DominikRafacz
Copy link
Collaborator Author

fixed in 05ccecd

tidysq 1.0 automation moved this from To Do (low priority) to Done Aug 7, 2020
@DominikRafacz DominikRafacz reopened this Aug 17, 2020
@DominikRafacz
Copy link
Collaborator Author

Even after implementing S4 method, it does not dispatch as expected, contrary to common sense. Temporary solution is our own function get_sq_lengths() implemented in 63739a3

@DominikRafacz DominikRafacz moved this from Done to To Do (high priority) in tidysq 1.0 Aug 17, 2020
@ErdaradunGaztea
Copy link
Member

Might want to read this paper, especially chapter 5. Not sure if this helps, but it's worth reading.

@DominikRafacz DominikRafacz removed this from To Do (high priority) in tidysq 1.0 Dec 19, 2020
@ErdaradunGaztea ErdaradunGaztea pinned this issue Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants