When looking for best practices the Data chapter of R Packages is as close to truth revealed as it gets; I recommend you give it a read (it is not too long).
The key questions you need to answer for yourself are:
- do you intend to distribute the data as TSV file, or R object? I suggest R objects
- do you intend to let users see the data in their environment pane? Or use it internally by the functions of your package?
My personal preference is to have lookup tables internal, so what I use is something along the following lines somewhere in data-setup.R. This file would live in data-raw directory and be sourced manually at package build time.
lookup_table <- readr::read_tsv("./somewhere-on-filesystem/table.tsv")
usethis::use_data(lookup_table,
internal= T,
overwrite = T)
Note that the preference for internal datasets is a personal one, and you can omit the internal = T and allow your users to access the tables directly / they may need to use data(lookup_table) depending on your lazydata settings.
If you decide to not make your data internal you should seriously consider documenting it though.