Skip to content

Latest commit

 

History

History

r-from-the-command-line

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

r-from-the-command-line

In this talk, attendees will get an introduction to writing command-line interfaces in R. The talk begins with a discussion of fundamental command-line topics like managing output streams, exit codes, and environment variables. After that, the talk will explain each argument to the "Rscript" executable. The talk will then describe how to write your own R programs that take in command-line arguments, using builtin functions like commandArgs() and external packages like {argparse} and {crayon}. The talk concludes with a demo of two R command-line interfaces used in the {lightgbm} project: one for running linting with {lintr} in continuous integration and one for building a C++ library using CMake. Sample code will be available on GitHub prior to and following the talk.

Demo Code

See DEMO.md for the examples used in the talk.

Where this talk has been given