What is it:
R is a free software programming language used in the field of statistical computing and graphics. This program is mainly used by Statisticians and Data Analysts.
Though Operating systems will have simpler way of doing this however when you are working in the programming environment having the ability to use the commands for creating or manipulating the files is always useful.
How to delete directory using R Programming command:
Step 1: If you do not know your active directory check the same using the below command.
Step 2: Use the below r programming command to delete the directory.
unlink(“mytestDir“, recursive = TRUE)
**replace the “mytestDir” with your actual directory name.
R Programming uses the word “unlink” instead of “delete” which is more logical for deleting folder because R follows the UNIX way of deleting directory.
Note: Make sure you are using the commands after the ‘>’ symbol.