hypertidy / silicate

A general form for complex data
https://hypertidy.github.io/silicate/
53 stars 4 forks source link

Implement as_dm.sc() #134

Open krlmlr opened 3 years ago

krlmlr commented 3 years ago

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 commented 3 years ago

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