Skip to content

sample codes for writting a function with unknown number of arguments

2 messages · tomkur2006-takehome at yahoo.com, Duncan Mackay

#
At 04:28 22/03/2008, you wrote:
Here is something to think about to get you started

   flist <-  list.files(path    = "D:/R/Rfiles/",
                        pattern = ".+[.][rR]",
                        full.names = TRUE)

   # Source the files:
   for (j in 1:length(flist)) {

     your commmands

   }

   # cleanup
   rm(flist)

Regards

Duncan Mackay

Department of Agronomy and Soil Science
University of New England
ARMIDALE NSW 2351
email: dmackay9 at pobox.une.edu.au
home  mackay at northnet.com.au