I just want to ask about shiny accounts, I have two shiny registered accounts and now when I want to deploy I saw error like this
Do you want to proceed with deployment? [Y/n]: y
Error: Please specify the account which you want to deploy the application to (there is more than one account registered on this system).
So my question is how to specify the account that I want to used it in deploy application, when I just tried to run like this
shinyapps::setAccountInfo(name='xxxx',
token='13SDADASDSADAD9FCCEC48C016D5D97',
secret='863pLqbfaxeradasdafasfsadxzadadXgi2NfXh')
setwd('D:/ASD/test')
library(shinyapps)
deployApp()
I still got same error.
Shinyapps.io Want to deploy to the web but prefer not to run your own server? You can host your Shiny apps on the web in minutes with Shinyapps.io.
Create a shinyapps.io accountGo to shinyapps.io and click “Dashboard.” The site will ask you to sign in using your email and password, your Google account, or your GitHub account. The first time you sign in, shinyapps.io prompts you to set up your account.
Go to top menu your Rstudio-> Tools-> ShinnyApps -> Manage Accounts
There are mainly two different parameters to set up: the name
and the account
, each used in a different function. Previous answers did not make this altogether clear, so let me add explanations.
Step 1: Set name
via setAccountInfo()
:
Go to https://www.shinyapps.io/admin/#/dashboard and get your personal name/token/secret, e.g. "myName" / "myToken" / "mySecret". You'll need all three to authorize your account.
library(shiny)
library(rsconnect)
rsconnect::setAccountInfo(
name = "myName",
token = "myToken",
secret = "mySecret")
You're now ready to deploy your apps. If you have a single account, that is all you need to do. But with multiple accounts, you also need to set the account
explicitly in the deployApp()
function:
Step 2: Set account
via deployApp():
setwd("my/local/dir/") # or set the full path below
rsconnect::deployApp("myAppNameOffline",
appName = "myAppNameOnline",
account = "myname")
Bonus: If you set option appName
explicitly your app can have a different name online as it does offline, e.g. "myapp-version-999"
can simply become "myapp"
online.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With