SimonGreenhill / rcldf

rcldf - The R library for reading CLDF files
Other
16 stars 4 forks source link

Consider adding writing functionality #3

Open SimonGreenhill opened 5 years ago

SimonGreenhill commented 5 years ago

What would the API be?

Need to:

  1. Generate metadata
  2. identify/specify foreign keys
  3. specify table types
  4. add/remove tables.
# work off data.frames?
> write.cldf(table1, table2, table3, directory="xxx")

# work off a CLDF object?
> obj <- cldf()  # empty
> add_table(obj, name, table, type="wordlist")
> add_foreign_key(obj, 'a', 'b')
> make_metadata(obj)
> write.cldf(obj, directory="xxx")
SimonGreenhill commented 4 years ago

See #5