I'm fairly familiar with SAS and know how to use macros to simplify repetitive tasks. However, I'm new to R and don't know how I can do that.
here's the code I got:
psd.coffee <- read.csv (unzip ("C:\Users\me\Desktop\FAS (PSD)\psd_coffee_csv.zip", exdir = "C:\Users\me\Desktop\FAS (PSD)"))
As you can see, the code extracts as well as reads the csv file that's within the zipped file. now I have a bunch of zipped files (e.g. psd_grain_csv.zip, psd_fruits_csv.zip, and so on).
I want to be able to create a new data set for ever zip file based off of the commodity without having to write the entire code all over again. Again, this would be a pretty simple task in SAS, but have no clue how to do it in R. Any help is much appreciated.