
  # -------------------------------------------------------------------------------------------------------------------------  #
  #  -----------------------------------------------------------------------------------------------------------------------   #
  #                                                                                                                            #
  #           File Name              :  sourcing multiple files.R                                                              #
  #           Last Updated Funclist  :  15 Feb 2014,  1:13 AM (Saturday)                                                       #
  #                                                                                                                            #
  #           Author Name            :  Rick Saporta                                                                           #
  #           Author Email           :  RickSaporta@gmail.com                                                                  #
  #           Author URL             :  www.github.com/rsaporta                                                                #
  #                                                                                                                            #
  #           Packages Called        :  NA                                                                                     #
  #           Packages Used via NS   :  NA                                                                                     #
  #                                                                                                                            #
  #  -----------------------------------------------------------------------------------------------------------------------   #
  #                                                                                                                            #
  #                                                                                                                            #
  #                                                                                                                            #
  #                                                                                                                            #
  #                                                     <END FUNCS>                                                            #
  #  -----------------------------------------------------------------------------------------------------------------------   #
  # -------------------------------------------------------------------------------------------------------------------------  #

    # Get the list of files
    #----------------------------#
      folder <- "path/to/files"
      fileList <- dir(folder, recursive=TRUE)  # grep through these, if you are not loading them all

      files <- paste(folder, fileList, sep=.Platform$file.sep)  # use platform appropriate separator

    # Load them in
    #----------------------------#
      # Method 1:
      invisible(sapply(files, source, local=TRUE))

      #--

      # Method 2:
      sapply(files, function(f) eval(parse(text=f)))
