Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content
Previous: Getting Started Next: Installing Packages

Executing Shell Commands

The function system(command) executes the given shell command:

# change directory to home directory
# display all files in current directory
dir(path = ".", all.files = TRUE)
# execute bash command ls -al (in Linux)
system("ls -al")
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content