updated array.R with multiple file commandline