The examples in this section create a custom function that uses the lof function from the R package "Rlof". This section shows two versions of the custom function: one uses the R function apply to execute the Rlof function lof, the other avoids the use of apply by creating a for-loop.
This example requires that the R package "Rlof" be installed on the cluster. Refer to the instructions in the Installing R Packages section of Installing Additional Packages on the Cluster.