slurm_apply function on npregbw

58 views Asked by At

The slurm_apply function in rslurm package needs the params argument as a dataframe. If I define a function for kernal regression using npregbw from np:

reg_fun <- function(reg_formula, data) {
    
    
    np_bw <- np::npregbw(as.formula(reg_formula), data = data)
    ker_reg <- np::npreg(np_bw, ckertype="gaussian", ckerorder=2)
  
  }

how do I pass the params argument to slurm_apply?

sjob <- slurm_apply(reg_fun, params, jobname = 'kernal_reg',
                      nodes = 2, cpus_per_node = 2, submit = FALSE)
0

There are 0 answers