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

Implement as_dm.sc() #134

Open
krlmlr opened this issue Dec 14, 2020 · 1 comment
Open

Implement as_dm.sc() #134

krlmlr opened this issue Dec 14, 2020 · 1 comment

Comments

@krlmlr
Copy link

krlmlr commented Dec 14, 2020

with separate methods for all models if necessary.

Only suggest dm, delayed S3 registration via vctrs::s3_register() .

Example for PATH():

x %>%
  unclass() %>%
  as_dm() %>%
  dm_add_pk(object, object_) %>%
  dm_add_pk(path, path_) %>%
  dm_add_pk(vertex, vertex_) %>%
  dm_add_fk(path, object_, object) %>%
  dm_add_fk(path_link_vertex, path_, path) %>%
  dm_add_fk(path_link_vertex, vertex_, vertex)

Result:

Screenshot from 2020-12-14 11-52-27

@mdsumner
Copy link
Member

yes, appreciate the input - this is overdue and I hope to spend some time on it in next months

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