I'm making a package that reads an environment variable once attached. This env variable contains a path to a configuration file to be parsed. Once parsed, I store it in a dataframe. All of this is done in the .onAttach function and the dataframe needs to be created everytime the user attaches the package as it points to a file that she/he may change anytime before attaching the package
All the functions in the package need to have access to the dataframe thas is created in the .onAttach function and I don't want to create it using in the global environment of the user.
Is there a way to run the chunk of code that parses the file only in .onAttach and make the data available to all other functions ?
Thanks