lvaudor / glitter

an R package which writes SPARQL queries
https://lvaudor.github.io/glitter
44 stars 5 forks source link

n_distinct()? #115

Closed maelle closed 1 year ago

maelle commented 1 year ago

Spin off from #94

@lvaudor could you please elaborate on that feature request? What's the tidyverse equivalent if there's any?

maelle commented 1 year ago

The tidyverse inspiration for glitter::n_distinct() would be... dplyr::n_distinct() (did I misunderstand your question?). Is that a similar problem to my not knowing tally() i.e. dplyr has so many functions that any individual has his/her favorites?

maelle commented 1 year ago

In tests we have spq_select(query, lang, count = n(unique(article))), good that this works.

So what we'd have is spq_select(query, lang, count = n_distinct(article)).