-2
I have an array with the name of my datasets and want to store the contents of them in files .csv
individual dynamically.
With the code below, the files are created, but instead of the content of the data sets, the name of the data set is saved. I have already used the assign()
and it’s the same.
dsets <- c('wairlines', 'wairports', 'wflights', 'wplanes', 'wweather')
for(ix in 1:length(dsets)) {
write.csv(dsets[ix], file = paste0('./input_orig/',dsets[ix],'.csv'))
}
The above code should be equivalent to:
write.csv(wairlines,file='./input_orig/wairlines.csv')
write.csv(wairports,file='./input_orig/wairports.csv')
write.csv(wflights,file='./input_orig/wflights.csv')
write.csv(wplanes,file='./input_orig/wplanes.csv')
write.csv(wweather,file='./input_orig/wweather.csv')
From now on my thanks
Thanks for the copydesk... learning...
– Orson Galvão