Best Practices for Using R Transforms

In this tutorial you will learn how to organize your R-code used in Panopticon R-transforms in ways that facilitate code maintenance, enable code re-use, and improve performance of you transforms. Specifically, you will learn about the benefit of writing your R scripts as functions that can be saved as separate files and reused in multiple locations within your Panopticon workbooks. You will also learn about the advantages of developing and testing your R functions in RStudio, where you have access to R help documentation and full exception messages. Finally, you will learn how to configure Rserve to automatically load the R-code files containing your functions as part of the start-up process. Using this method, you avoid the overhead of reading the files with function definitions upon each call to R since the functions will already be loaded and available for all calls to Rserve.