Hi I have an organism directory that contains two folders galGal3 and hg19 and many other files. orgDir = '/home/mary/org' When I try to use list.dir() function, it gives me the same answer, no matter what is the value of full.names argument.> list.dirs(path = indexDir, full.names = FALSE)[1] "/home/mary/org"[2] "/home/mary/org/galGal3" [3] "/home/mary/org/hg19" > list.dirs(path = indexDir, full.names = TRUE) [1] "/home/mary/org" [2] "/home/mary/org/galGal3" [3] "/home/mary/org/hg19" Also, It prints the directory itself which I don't want to be printed. Why it is so? Any workaround for this problem? Thanks -- ------------- Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]]
firstly - it looks like you define orgDir but then your code later refers to indexDir? that being said, I don't think that is relevant. You could always try upgrading to the latest version and see if the problem goes away (if you're not already). I can't replicate the issue here but we can't guess what version you're running of R. It's always helpful to include What build/operating system etc. Use the following command and copy and paste. into your reply please. R.version One option you've got perhaps is to indexDir into the directory and then try the same commands you've mentioned in your post. another option which might work would be based on these two lines. a1<-file.info(list.files(indexDir)) mydir<-row.names(a1[a1$isdir==TRUE,]) let me know if you can't get it. I don't know why your code doesn't work. -- View this message in context: http://r.789695.n4.nabble.com/list-dir-function-tp4033044p4035093.html Sent from the R help mailing list archive at Nabble.com.