Select.R
Select columns from a command line using an R script
Usage
Rscript.exe select.R -c columns input-csv-file.csv
How it works:
Script selects columns from "input-csv-file.csv" using column numbers or Excel A-ZZ indexing.
Columns selection is done by supplying numbers(letters):
separated by commas (ie " 1,9") for individual columns
separated by dashes (ie "2-4,5-8") for ranges of columns
Column numbers example: "-c 1,3,5-7" will select columns 1,3,5,6,7
Column Excel indexes example: "-c A,C,E-G" will select columns 1,3,5,6,7
Notes:
The script handles also mixed selection ("-c A,5-7" is the same as "-c 1,5-7").
Letter indexes are case insensitive ("-c A" is the same as "-c a").
The script requires the "tidyverse" and "dplyr" packages to be installed on your system.
Last updated