Parallelize R code using user-defined functions (UDFs) in sparklyr

R to Spark workflow diagram