An open API service indexing awesome lists of open source software.

https://github.com/benjaminguinaudeau/systemr

A small package that create an api to run system command outside rstudio
https://github.com/benjaminguinaudeau/systemr

Last synced: 14 days ago
JSON representation

A small package that create an api to run system command outside rstudio

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# systemr

The goal of systemr is to run system command outside rstudio. Sometimes Rstudio-Terminal does not behave exactly as normal terminals. For those case, systemr can be used from a normal terminal to create a local api, that will run system command.

## Installation

You can install the latest development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("benjaminguinaudeau/systemr")
```
## Example

Open a terminal and run. This will serve the api on the given port.

``` r
serve_cli(host = "localhost", port = 5000)
```

From your rstudio session, you can now run system_api, whic will execute the code in the terminal and transfer the output to rstudio.

``` r
system_api("pwd")
```