Files

The Files tab is where you manage your R scripts, data files, and folders. Think of it as a lightweight file manager built right into the app. You can create new scripts, organize them into folders, edit text files, and even run R scripts directly without switching tabs.

Browsing your files

When you open the Files tab, you will see the contents of your Documents folder. Folders show a chevron on the right; tap one to open it. At the top, a breadcrumb trail shows where you are in the folder hierarchy, and you can tap any breadcrumb to jump back to that level. Tap the home icon to return all the way to the root.

Each file row shows the file name, its size, and when it was last modified. R scripts (.R files) get a green icon so they are easy to spot, while folders are blue and other file types are gray.

Projects

Your files are organized into projects inside the Documents/Projects/ folder. When you first launch webRios, a (Default) project is created automatically. This is where your files live unless you create additional projects.

To create a new project, switch to the Projects tab and tap the + button. Each project gets its own folder on disk, keeping scripts and data files neatly separated. You can switch between projects at any time and the Editor tab will show the active project name in its header.

Because projects are stored in your app’s Documents container, they are also visible in the iOS Files app under On My iPhone (or On My iPad) > webRios. This means you can use Files to copy data into a project folder, share scripts with AirDrop, or back up your work to iCloud Drive.

Creating files and folders

Tap the menu button (...) in the top-right corner to see your options:

  • New R Script: creates a new .R file in the current folder. You will be asked to name it, and the .R extension is added automatically if you leave it off.
  • New Folder: creates a subfolder to help keep things organized.
  • Import Data: opens the data import wizard, which can help you bring CSV files into your R environment.

Once you create a new script, it opens in the built-in editor right away so you can start writing code.

Editing text files

Tap any text-based file (.R, .txt, .csv, .json, .md) to open it in the file viewer. You will see the contents with line numbers and, for R files, syntax highlighting.

To make changes, tap the Edit button in the top-right corner. This switches to an editable text field where you can type freely. When you are done, tap Save to write your changes, or Cancel to discard them.

CSV files get special treatment: they open in a formatted table view by default, making it easy to scan rows and columns. You can switch to the raw text view using the Raw button, and toggle back with Table.

Image files (PNG, JPEG) open in a scrollable preview so you can view plots or graphics you have saved.

Renaming and deleting

You can manage files with swipe gestures, just like in other iOS apps:

  • Swipe left on a file or folder to see the Delete (red) and Rename (orange) buttons.
  • Long-press a file for a context menu with the same options, plus the ability to Run Script for R files.

Deleting is permanent. You will get a confirmation prompt, but there is no trash or undo after that.

Searching for files

Use the search bar at the top of the file list to filter by file name. This searches within the current folder, narrowing the list as you type.

For deeper searches, tap the magnifying glass icon in the toolbar to open Search in Files. This lets you search for text inside your files across all folders, which is useful when you cannot remember which script contains that function you wrote last week.

Running R scripts

There are two ways to run an R script directly from the Files tab:

  1. Long-press the file and choose Run Script from the context menu.
  2. Open the file, then use the Editor’s run functionality.

When you run a script this way, the code is sent to the R console and executed as if you had typed it line by line. Any output appears in the Console tab, and plots show up in the Plots tab.

Setting the R working directory

By default, R’s working directory might not match the folder you are browsing. If your script needs to read a data file using a relative path (like read.csv("data.csv")), you will want to set the working directory first.

Navigate to the folder that contains your data files, then tap the menu (...) and choose Set as R Working Dir. This runs setwd() behind the scenes so that R knows where to look for files.

Set the working directory before running scripts that read or write data files. This way your R code can use simple file names like "data.csv" instead of full paths.

Shared files

If you share a file to webRios from another app (like the Files app or Safari), a notification badge appears in the toolbar. Tap it to review and import the shared files into your Documents folder.

Supported file types

The built-in editor can open and edit any text-based file. R scripts, plain text, CSV, JSON, and Markdown are all fair game. Image files open in a preview viewer. Other file types will show in the list but may not be viewable directly in the app.

Pull down on the file list to refresh if you have made changes outside the app (for example, through the iOS Files app).