r - Load all files from folder and subfolders -
i know source()
in r. takes path and/or filename load i.e. function saved in .r file. need same command, supposed load every .r file 1 folder , subfolders.
is there oneliner (some library) or have write loop 'n everything?
this might work
lapply(list.files(pattern = "[.]r$", recursive = true), source)
Comments
Post a Comment