Re: [R] how to get list of files within a particular local file folder

2012-07-04 Thread Ajay Ohri
Dear List, Say I can use getwd() and setwd() to change my working directory. How can I read in all the files within that directory using command line (like a ls() but for the path specified) Regards Ajay Websites- Technology http://decisionstats.com [[alternative HTML version

Re: [R] how to get list of files within a particular local file folder

2012-07-04 Thread Jeff Newmiller
How you read all ... files is up to you, as that depends both on the type of data contained in the files and on how you plan to use the data. Most likely the solution will involve using the files.list function and either lapply or a for loop, and the data will end up stored in a list of data

Re: [R] how to get list of files within a particular local file folder

2012-07-04 Thread peter dalgaard
On Jul 4, 2012, at 15:24 , Ajay Ohri wrote: Dear List, Say I can use getwd() and setwd() to change my working directory. How can I read in all the files within that directory using command line (like a ls() but for the path specified) Something like all - lapply(list.files(),

Re: [R] how to get list of files within a particular local file folder

2012-07-04 Thread Michael Weylandt
Either dir() or list.files() Michael On Jul 4, 2012, at 8:24 AM, Ajay Ohri ohri2...@gmail.com wrote: Dear List, Say I can use getwd() and setwd() to change my working directory. How can I read in all the files within that directory using command line (like a ls() but for the path

Re: [R] how to get list of files within a particular local file folder

2012-07-04 Thread Bretschneider SIG-R
Dear Ajay Ohri, Re: Dear List, Say I can use getwd() and setwd() to change my working directory. How can I read in all the files within that directory using command line (like a ls() but for the path specified) I use this function, # functions getFolder - function(pat) {