Skip to content

Commit

Permalink
Add rstudio subcommand docs
Browse files Browse the repository at this point in the history
  • Loading branch information
remlapmot committed Oct 15, 2024
1 parent b909da5 commit d0ee8e0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/opensafely-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,23 @@ opensafely exec IMAGE bash
This can be useful if you want to explore the image manually.


### `rstudio` - Opening the r image in rstudio-server

To launch the OpenSAFELY r image running in a local instance of rstudio-server please navigate to your research repository and run

```bash
opensafely rstudio
```

This will launch the rstudio-server session in a browser window, most likely at `http://localhost:8787/`. This provides RStudio interface to the r image. Hence the version of R and all the packages are at their respective versions as in the r image.

If you have an `.Rproj` file in your repository, `opensafely rstudio` detects this and opens the rstudio-server session in project mode. In this mode the Git pane is available.

To end your rstudio-server session press ++ctrl+c++ in the Terminal window in which you ran the `opensafely run` command.

An alternative method to open your project in rstudio-server is to do so using [Codespaces](/getting-started/how-to/use-github-codespaces-in-your-project/#how-to-access-rstudio).


### `jupyter` - Running JupyterLab

[Jupyter notebooks](https://jupyter.org/) are useful interactive
Expand Down

0 comments on commit d0ee8e0

Please sign in to comment.