https://github.com/tomaztk/working_with_system_commands_in_r
Working with system commands in R
https://github.com/tomaztk/working_with_system_commands_in_r
cli cmd r r-language r-programming
Last synced: about 1 year ago
JSON representation
Working with system commands in R
- Host: GitHub
- URL: https://github.com/tomaztk/working_with_system_commands_in_r
- Owner: tomaztk
- License: mit
- Created: 2020-01-05T09:56:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-21T11:57:22.000Z (over 5 years ago)
- Last Synced: 2023-03-09T08:56:03.801Z (about 3 years ago)
- Topics: cli, cmd, r, r-language, r-programming
- Language: R
- Homepage:
- Size: 15.6 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Working with Windows CMD system commands in R
R Examples for working with windows CMD commands from R code using
the following commands:
1. fc / compare
2. rename
3. move / copy
4. ping (pingpath)
5. systeminfo
6. tasklist (taskkill)
7. ipconfig / netstat
Example of using file compare from R:
``` r
cmd_command <- "FC"
#cmd_args <- "/a C:\\Users\\Tomaz\\iris_file1.csv C:\\Users\\Tomaz\\iris_file2.csv"
cmd_args <- c('/a', file1, file2)
rr <- system2(command=cmd_command,
args= cmd_args,
stdout=TRUE,
stderr=TRUE,
wait = TRUE)
```
## Usage
Open the R file `cmd commands in R.R` in your favorite R IDE program and change your working directory.
## Blog post
More information is available on the [blog post](https://tomaztsql.wordpress.com/2020/01/06/working-with-system-commands-in-r/).
## Cloning the repository
You can follow the steps below to clone the repository.
```
git clone -n https://github.com/tomaztk/Working_with_system_commands_in_R.git
```
## License
These samples and templates are all licensed under the MIT license.
## Questions
Email questions to: tomaztsql@gmail.com