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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -