This command issues "ls *_hdl*.qassoc" to the system, just as if you were typing it in at the terminal. The intern=TRUE tells the system command to treat the output as an R object. I can store this in myfiles, then do some processing on myfiles, which is a vector containing all the filenames of files I want to process.
myfiles = system("ls *_hdl*.qassoc", intern=TRUE)
myfiles[1] "0-all.01_hdl_modeled.qassoc"
[2] "0-all.02_hdl_modeled_polyresid.qassoc"
[3] "0-all.03_hdl_med.qassoc"
[4] "0-all.04_hdl_med_polyresid.qassoc"
[5] "0-all.05_hdl_med_smokage_polyresid.qassoc"
[6] "1-male.01_hdl_modeled.qassoc"
[7] "1-male.02_hdl_modeled_polyresid.qassoc"
[8] "1-male.03_hdl_med.qassoc"
[9] "1-male.04_hdl_med_polyresid.qassoc"
[10] "1-male.05_hdl_med_smokage_polyresid.qassoc"
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.