Shinyapp as package how to read and write data outside the installed app in library

I have a largee shinyapp which was orgianall in two parts - an r package containing all the cutom functions used by the app, and a second github repo cotnain an Rstudio Project with the app files. The app relies on several GB of data files ( rasters, tables, and vector spatial data) as inputs ( plus user selected and input files) these were all managed in subdirectores of the rstudio project. Outputs ( also large) were saved to subdirecoties of the rstudio project. This system worked on Windows local installions and on a rstudio/shinyserver installation on AWS.

I would like to combine the whole app and its supporting cutom functions into a single rpackage. However, if I do this all the datafiles will need to be incuded either in the /data directory or in subdirectories in the /inst directory. Results files for the installed app would be reitten to the
users/username/AppData/Local/R/win-library/4.4/AppName/application directory.

Gvien sthe size of thedata files they cannot be easily packaged as part of the app, and they do not need removal and replacement each time the app is updated.

Is there any way I can point the packaged shinyapp to read and write files from outside of the app directroy, ( prefereably to a fixed user defined directory)?