Entering edit mode
3.5 years ago
Fede_Santos95
▴
20
I'd like to create a vector in which I should put some directories inside.
For example, when I ran the list.dirs()
, I found the following list of directories:
[1] "/home/platone1/MethylationData/_EPIPOLE_/"
[2] "/home/platone1/MethylationData/_EPIPOLE_//20210304_QEIC21-03-2_pt1_1-12"
[3] "/home/platone1/MethylationData/_EPIPOLE_//20210304_QEIC21-03-2_pt1_1-12/20210322_QEIC21-03-2_piastra1"
[4] "/home/platone1/MethylationData/_EPIPOLE_//20210304_QEIC21-03-2_pt1_1-12/20210322_QEIC21-03-2_piastra1/Data"
[5] "/home/platone1/MethylationData/_EPIPOLE_//20210304_QEIC21-03-2_pt1_1-12/20210322_QEIC21-03-2_piastra1/Data/Bookmark Analyses"
[6] "/home/platone1/MethylationData/_EPIPOLE_//20210304_QEIC21-03-2_pt1_1-12/IDAT"
[7] "/home/platone1/MethylationData/_EPIPOLE_//20210310_QEIC21-03-2_pt2_1-12"
[8] "/home/platone1/MethylationData/_EPIPOLE_//20210310_QEIC21-03-2_pt2_1-12/20210312_QEIC21-03-2_piastra2"
[9] "/home/platone1/MethylationData/_EPIPOLE_//20210310_QEIC21-03-2_pt2_1-12/20210312_QEIC21-03-2_piastra2/Data"
[10] "/home/platone1/MethylationData/_EPIPOLE_//20210310_QEIC21-03-2_pt2_1-12/IDAT"
[11] "/home/platone1/MethylationData/_EPIPOLE_//20210326_QEIC21-03-3_pt3_1-12"
[12] "/home/platone1/MethylationData/_EPIPOLE_//20210326_QEIC21-03-3_pt3_1-12/20210326_QEIC21-03-3_piastra3"
[13] "/home/platone1/MethylationData/_EPIPOLE_//20210326_QEIC21-03-3_pt3_1-12/20210326_QEIC21-03-3_piastra3/Data"
[14] "/home/platone1/MethylationData/_EPIPOLE_//20210326_QEIC21-03-3_pt3_1-12/IDAT"
....
If I wanted to extract only directories which finish with "/IDAT" and put them inside a vector like indices of the same vector, how could I do?