0

I have just finished writing a set of R scripts. There is one master file and 5 additional external r files called by the source function. I was wondering whether it is possible to unify the five external scripts into one single file; dividing the entire code into five sections run into different moments.

Is it possible to do so by using source?. If not, which strategy do you suggest?

csgillespie
  • 59,189
  • 14
  • 150
  • 185
Stefano Lombardi
  • 1,581
  • 2
  • 22
  • 48

1 Answers1

0

As @flodel said in the comment, write functions. There are a few previous answers that are worth checking out:

  1. Workflow for statistical analysis and report writing
  2. writing functions vs. line-by-line interpretation in an R workflow
  3. How do you combine "Revision Control" with "Workflow" for R?
Community
  • 1
  • 1
csgillespie
  • 59,189
  • 14
  • 150
  • 185