SSH: Setting Up Directories
To connect to your account, input this line into a terminal (obviously input your own username instead of "username"):
It will prompt you for your password. Enter the password you received in the email.
Next, create a folder to put your first app in. Like the email says, you want to put this at
~/ShinyApps/myapp/. The "myapp" folder can be named whatever you want, but the "ShinyApps" folder needs to have that name.
mkdir ShinyApps mkdir ShinyApps/myapp
SSH: Installing R Packages
Next, you can go ahead and install R packages, if you know which ones your application will need.
First, open R just like you would on your own computer:
Next, install a package (e.g. "maps"):
install.packages("maps", dependencies = TRUE)
It will ask you the following questions:
Would you like to use a personal library instead? (y/n) Would you like to create a personal library ~/R/library to install packages into? (y/n)
You can answer "y" to both of these. Your applications will be able to use packages installed here.
Then you can follow the standard procedure for installing R packages.
You can now quit R and exit ssh:
On your own computer, navigate to the directory your Shiny application's folder is in, e.g.:
Once you're there, you can copy the application folder to the server:
scp -r myapp/ email@example.com:ShinyApps/
Or if you don't want to copy all the files, you can move them one at a time:
scp myapp/ui.R firstname.lastname@example.org:ShinyApps/myapp/ui.R
Try It Out
Now you should be able to access your application at http://spark.rstudio.com/username/myapp/
You can now send it to all your friends or leave a link in the comments!