Creating domain files in R

file contains output generated by python scripts. the R file is used to
create and validate domain level files (i.e. all forms for a domain
within a year level combined into a single file)
split R function definitions into a separate file

also update R file input and output paths