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