Customising an existing Web App

Editing a Web App's source code

When you create a Web App in the workspace, a folder containing all the app's scripts and files is also created. You can view and edit the code by navigating to the Files tab and moving inside the folder named after your Web App. Note that any libraries that the Web App uses will need to be installed in the workspace R Console for that R version.

If you edit the source code while the Web App is running, you will see a notice reminding you to refresh the app in order for the changes to be applied.

Adding an image to your Web App tile

You can add an image to your Web App tile, this image must be saved directly in the Web App's folder and should be named 'tile.png'.

The recommended image size is 336 pixels by 150 pixels. Please note that the bottom 30 pixels will be covered by the action buttons.

If you add an image, the name of the Web App will no longer be visible on the tile. Thus, the image should include the name of the App.

The tile on the right shows the default Web App image. The tile on the left had a custom image added to its source code.

Web Apps and R versions

Web Apps can be set to run on a specific version of R. When creating a new Web App, you can choose which version of R you wish the Web App to run on. This will be specified in a .version file saved in your Web App folder.

If you wish to change the version of R, edit the .version file and save it. Note, the version you select must be available in your workspace. Additionally, if the version later becomes unavailable, the Web App will run on the default version of R unless you change the configuration in the .version file.

The format of the R version can be any of the following (e.g. for R 4.1.1):

  • 4.1.1
  • r:4.1.1

Workspaces currently support 4.1.1, 4.0.2, and 3.6.3 (soon to be deprecated).

If you specify an incomplete version, such as 3.6, or a complete but non-available version, such as 3.6.6, the Web App will use the highest complete version available, such as 3.6.3.

Importing data into a Web App

As part of your Web App, you may wish to import files stored within your workspace. For CSV files, this can be done using readr library:

library(readr)
dataset <- read_csv("~/files/your_folder/file_name.csv")

You can also import database tables located in the workspace using the following function:

xap.read_table("table_name")

For more information, see the reading and writing data in R article.

Updated on November 11, 2025