Running R code in parallel using parallel::clusterApply()