rOpenSci | How to Use System Commands in your R Script or Package

It is the stdin stream of the program so for example you can pipe data to your program:

x <- 'foo\nbar\nbaz\n'
system("grep ba", input = x)

That would be the equivalent of a shell command

echo 'foo\nbar\nbaz\n' | grep ba
2 Likes