Try to create a zip file from one folder using R.
It mentioned \"Rcompression\" package here: Creating zip file from folders
But I didn\'t find where I can downl
For avoiding (a) an issue with relative paths (i.e., the zip file itself containing a folder structure with the full folder path to be zipped) and (b) for
loops (well, style), you may use
my_wd<-getwd() # save your current working directory path
dest_path<-"C:/.../folder_with_files_to_be_zipped"
setwd(dest_path)
files<-list.files(dest_path)
named<-paste0(files,".zip")
mapply(zip,zipfile=named,files=files)
setwd(my_wd) # reset working directory path
Unlike R´s build-in unzip
function, zip
requires a zip-program like 7-zip (Windows) or the one being part of Rtools to be present in your system path.