I am trying to concatenate many vectors in R using c(). I have declared each of them to end with “_n” (i.e. filename_n). Now I want to know whether there is an easier method to read them all than just entering in each variable. I know in Bash I can use ls *.file_extension > filename to read all files in. Is there a similar method in R.
Thanks.
From what I understand you might benefit from reading
?list.files,?read.table,?do.call,?sapply. As a means of example,(untested)
EDIT: it looks like you’re after
?lsand?getnow,or, more succinctly,