I have several nc files in a directory. The naming of the files is complex,for instance :
LPRM-AMSR_E_L3_D_SOILM3_V002-20120601T214436Z_20100801.nc
I want to list the files so that I can work with them,it seemed that R listed them ina certain order.
How can I tell R change the default display of list.files , and order them the files based on _yearmonthday only which represents yearmonthday in all files
LPRM-AMSR_E_L3_D_SOILM3_V002-20120601T214436Z _20100801
to list files in R I use this :
a<-list.files("D:\\semon", "*.nc", full.names = TRUE)
I get this :
[1] "D:\\LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T170757Z_20110916.nc"
[2] "D:\\/LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T194524Z_20110917.nc"
[3] "D:\\/LPRM-AMSR_E_L3_D_SOILM3_V002-20120604T122649Z_20110915.nc"
I want to get this :
[1] "D:\\/LPRM-AMSR_E_L3_D_SOILM3_V002-20120604T122649Z_20110915.nc"
[2] "D:\\/LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T170757Z_20110916.nc"
[3] "D:\\/LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T194524Z_20110917.nc"