r delete files in folder code example Example: r delete all files in folder unlink(directory_path, recursive = TRUE)