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
- Host: GitHub
- URL: https://github.com/benjaminguinaudeau/systemr
- Owner: benjaminguinaudeau
- Created: 2020-06-13T14:03:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-26T17:33:23.000Z (over 4 years ago)
- Last Synced: 2025-02-07T19:34:45.517Z (2 months ago)
- Language: R
- Size: 26.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - benjaminguinaudeau/systemr - A small package that create an api to run system command outside rstudio (R)
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")
```
## ExampleOpen 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")
```