I apologise in advance for perhaps asking a very obvious or uninformed question, but considering that I have used quite a bit of time trying to solve it now without any apparent solution, I venture to post it anyways:
I've worked on a project now for some time that have produced an .R file with around 1300 lines of code, which starts to get troublesome to work with. I am certain that there are better ways of structuring code than just having it line after line in such a manner. The main purpose of the programme is to load some data in, transform it in various ways and then write the result out as .csv files.
My question is then: Where can I find examples of or learn how to structure R code that becomes unruly in a single file?
One solutions I have thought of is to use a structure with one main file with several source calls to other files. Another would perhaps be to make a package.