[R] list.files accessing subdirectory as relative path?

Adel adel.daoud at sociology.gu.se
Mon May 5 21:29:33 CEST 2014


Dear list members,

I would like to access a subdirectory given where the work directory has
been set. So I have:

> getwd()
[1] "C:/Users/Lord Adellus/Dropbox/I8child1/Data"

> list.files() # give three folders
 [1] "Least Developed Countries"                         
 [4] "Low middle income grouping"                         "More advanced
developing countries and territories" 

> list.files(path = "../Least Developed Countries") # I want to access now
> one of the subdirectories
character(0)

But as you can see R does not want to look into the specified subdirectory.
I have tried several combination and searched the list but without any great
success. 

Actually: 

list.files(path = "../...") #goes up one level in the folder structure so I
cannot see what the problem is.


Thanks in advance.
Adel




--
View this message in context: http://r.789695.n4.nabble.com/list-files-accessing-subdirectory-as-relative-path-tp4689997.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list