So I want to use R to automatically create a folder for the dataset that I happen to be analyzing. Due to laziness, a function is being written to create this folder, analyze the data, and store results into that folder so that they can be looked at later on.
Now if I try to use the aircraft data from library(robustbase):
setwd("C:/Users/Admin/Desktop/")
analysis<-function(dataset,other_bit_and_pieces){
paste("dir.create(",dataset,")",sep="")
}
analysis(aircraft)
I get either an error message saying that aircraft does not exist, or (if I load the library), it spits out "dir.create(c( all the data from aircraft))"
How should I be writing this so that a new folder is created with the dataset names every time I change dataset?