ropensci / rdflib

:package: High level wrapper around the redland package for common rdf applications
https://docs.ropensci.org/rdflib
Other
57 stars 9 forks source link

Export 'normalize_table' and 'poor_mans_nquads' #40

Open James-G-Hill opened 3 years ago

James-G-Hill commented 3 years ago

Hello, just a suggestion that 'normalize_table' and 'poor_mans_nquads' functions may be handy to export so that the user can call them with :: and not need ::: (which causes 'Check' to complain).

My initial use case for this was that I had a table where some entries were NA; using write_nquads directly was including the NAs as blank objects in my graph but it seemed unnecessary to include those triples if there's no object. An alternative of course would be to include an option to normalize_table to remove NAs but I think exposing these will give you the user more flexibility to customize their own variations on write_nquads.

cboettig commented 3 years ago

Makes sense. I wonder if it wouldn't be better though to (also) change the behavior to avoid writing explicit NAs at all? What do you think? would you have any interest in preparing a PR for this?

James-G-Hill commented 3 years ago

Hello, yes, I think it would be good to have both options; expose the underlying functions and also allow the user to add a boolean to remove NAs. I would be happy to prepare a PR for this in the near future although I'll be a little busy for a couple of weeks. Will come back to it though.

cboettig commented 3 years ago

Thanks, a PR would be welcome but no rush, this package will still be here.