I want to call in files from subdirectories without changing my working directory within my script. Is that possible? And if so what would be the simplest way to do that? for example, if I do setwd("C:/Users/Hello") but I have files in C:/Users/Hello/Data1 and C:/Users/Hello/Data2, can I still keep my working directory as C:/Users/Hello/ while calling in files in Data1 and Data2? -- View this message in context: http://r.789695.n4.nabble.com/Working-in-subdirectories-tp3654886p3654886.html Sent from the R help mailing list archive at Nabble.com.
On 08/07/2011 2:47 PM, ssathnur wrote:> I want to call in files from subdirectories without changing my working > directory within my script. Is that possible? And if so what would be the > simplest way to do that? > > for example, if I do setwd("C:/Users/Hello") > > but I have files in C:/Users/Hello/Data1 and C:/Users/Hello/Data2, can I > still keep my working directory as C:/Users/Hello/ while calling in files in > Data1 and Data2?Yes, just refer to the files using relative paths, e.g. Data1/something and Data2/something. Duncan Murdoch