Once you have added an R language data source, make sure that you name it properly on the first tab.
On the second tab you will initially see a default script. It is in fact not a working script as all lines have been marked as comments due to the hashtag (#) sign.
You may now either write your own R script from scratch, or you may import an existing script from a file.
If you open the R script file, MergeFiles.R, from the C:\TU\DataDiscovery\R\Script folder, you will have a pre-cooked script that just needs slight modifications to merge your own set of data.
One thing you probably will need to change, is the directory path to where your files to be merged are located.
Important: Notice the forward slashes (/) in the directory path!
Once you save the script, it will run and create one merged data set to be used as a data source for TARGIT Data Discovery.
If we then create a cube on top of that data source, we can verify the merge result by creating a TARGIT Analysis like this: