Closed HedvigS closed 1 year ago
The package skeleton is here now, and here's the stub I could see for this function: https://github.com/grambank/rgrambank/blob/7ff7bdc857dc219d51bea73495556ec5887b10dc/R/db.R#L22-L28
Mamta could use a function of this kind in R.
@HedvigS feel free to implement whatever you think makes sense here. Just adapt function name and signature to whatever works for you.
@xrotwang Okay.
@SimonGreenhill would you like me to do a PR for this function?
This function, which exists in most recent state now in #12 could be in rcldf instead of rgrambank. Up to @SimonGreenhill . It takes cldf ValueTables, so technically can work on other types of cldf-datasets besides grambank.
Here is a draft of a function that could be in this pacakge: https://github.com/HedvigS/personal-cookbook/blob/main/R/language_level_df.R
In cases where a dataset, like grambank, contains more than one dialect for the same language it reduces them to 1 per language. There are three different methods for this:
The current version just relies on there existing a wide value table with Language_ID in the environment. @xrotwang suggested re-writing it to take SQL input instead. I leave it up to @SimonGreenhill to decide how to proceed.