Uploading your Mini-app
To upload your own Mini-app to a workspace, first, create a new Mini-app using the Add dropdown menu. Then, you will be asked to name the Mini-app and choose a blank template. The template you choose will depend on whether you are using multiple files (server.R
+ ui.R
) or a single file (app.R
) in your application.
Once you created a blank template, navigate to the Mini-app folder in the Files tab, and paste your code into the appropriate files. Note that any libraries that the Mini-app uses will need to be installed in the workspace R Console.
If your Mini-app contains files not included in the template, these can be uploaded directly into your application's folder. Once you are finished editing the source code, you can open your app in the Mini-app tab (you may need to refresh it for the changes to take effect).
For information on how to import data, change the tile image or R version that Mini-app is running, see customising your Mini-app article.
Deploying Arihdia's Shiny apps to a workspace
Aridhia's Shiny apps can be found on aridhia.shinyapps.io/menu/. From the homepage, you have the option of running the Mini-apps on the web or visiting their GitHub repositories from where you can download the app source code for running it locally or in a workspace.
1. Download the app source code
To deploy Aridhia's Mini-app to a workspace, first, you need to navigate to its GitHub repository and download the Mini-app repository as a ZIP file.
Unzip the file, you will have a folder containing all the app files inside. Move into the repository folder and select all the files/folders within, click on the right-button and compress them into one single ZIP file. It is important that you do not compress the repository folder, but the files inside.
Alternatively, if you are a git user, you can clone the repository using the command line: git clone <Repository URL>
. This will create a folder in your local computer with all the repository files. Zip all the files and folders inside the repository folder.
2. Create a new Mini-app from a template
Move to the workspace and create a new blank Mini-app using the drop-down menu. Choose a name for the new Mini-app.
This will create a new folder in the Files tab with the same name as the new Mini-app. Look for this folder and delete it.
3. Upload the code to a workspace
Then, upload the ZIP file you created to the workspace. Unzip the file using the option on the right-hand menu.
When unzipping in the workspace, you will be asked to give a name to the folder the files will be extracted into. Give it the same name as your newly created Mini-app.
4. Install app dependencies
Move to the Mini-app folder and run the dependencies.R
script. The script will start the R console and install all the packages needed for the Mini-app.
5. Run the Mini-app
Go to the Mini-apps tab, click on Refresh and run the new Mini-app.
You will see that the app code appears as a default when you start the Mini-app. If you want to hide the code, go to the Mini-app folder and delete the file called DESCRIPTION
.