How to include .Rprofile in deploy to shinyapps.io?

44 views
Skip to first unread message

Eric Goldsmith

unread,
May 14, 2016, 4:59:31 PM5/14/16
to ShinyApps Users
I use .Rprofile to set options to define authentication credentials, API keys, etc. to keep sensitive info out of the code.

Creating a .Rprofile file in the root folder of my Shiny app works when I run it locally (i.e. the file is loaded by R, and option values are available via getOption()). But the .Rprofile file does not appear to be copied to shinyapps.io when the app is deployed there. Why?

Thanks,
Eric

Eric Goldsmith

unread,
May 17, 2016, 8:35:52 AM5/17/16
to ShinyApps Users
After more experimentation, it appears that when publishing an app to shinyapps.io, 'dot' files are ignored. 

I tried explicitly 'sourcing' both ".Rprofile" and ".Rconfig" (just to see if it was ignoring a specific filename). But, when I used a non-'dot' file (e.g. "config.R"), it worked (i.e. was bundled with the other files when publishing).

Is this behavior intentional?

Thanks,
Eric

Joshua Spiewak

unread,
May 17, 2016, 8:44:48 AM5/17/16
to Eric Goldsmith, ShinyApps Users
It is not. We have a fix, I am not sure at the moment the timing of a release.
In the meantime, you should be able to workaround this limitation by using rsconnect:deployApp() to deploy.

--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/72d6c8c5-53b8-4916-959e-9657a2c53b7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
    -- Josh
Reply all
Reply to author
Forward
0 new messages