Connecting
From R
The RStudio IDE provides a push-button publishing experience for some content types. See the Connecting - RStudio IDE chapter for details.
If you need to publish a type of content that doesn’t support push-button publishing or if you want to publish from R code or the R console, follow these instructions to get started.
You will need the following information to connect your account:
- The Posit Connect server URL
- Your username on the Connect server
- An API Key from the Connect server. See the API Keys chapter.
First, install the rsconnect R package:
install.packages("rsconnect")
Then use the rsconnect::addServer()
1 and rsconnect::connectApiUser()
functions to configure the server location and your account:
::addServer(
rsconnect"https://connect.mydomain.com",
name = "connect.mydomain.com")
::connectApiUser(
rsconnectserver="connect.mydomain.com",
account="myusername",
apiKey="micOXRF89vCQgEr1DovGQMyhmsASz1sf")
Now you’re ready to publish! See the Publishing from R chapter.
Footnotes
Use
rsconnect::addConnectServer
rather thanrsconnect::addServer
when using rsconnect versions before 1.0.0.↩︎