I'm developing an R package that relies on a dataset that is essentially a lookup table. I don't expect that the user to need to save the dataset so I don't want it listed in the Environment pane. However, I do want to allow the user to modify the dataset in controlled ways. The dataset itself is relatively small (25 rows and 4 columns), and essentially serves as a lookup table.
I generated the data and saved it in the
data\ directory in my package. I wrote a very small documentation file for the dataset and made sure to not
export() the dataset.
Within the "getter" functions, which extract information from the dataset, it looks like I can call the name of the dataset just fine. Within the "setter" functions, where I modify the dataset, I'm using
<<- to do so.
Should this system work? I don't know if I can provide a reprex, I keep getting an error message,
cannot change value of locked binding for the dataframe when I run