# NOT RUN {
library(pbdRPC, quietly = TRUE)
# rpcopt_set(user = "snoweye", hostname = "192.168.56.101")
m <- machine(user = "snoweye", hostname = "192.168.56.101")
check_rr(m) # pid 2857 (may differ)
kill_rr(m) # all remoter pids are killed
check_rr(m) # make sure no remoter servers are running
### use "; " to bypass multiple commands
preload <- "source ~/work-my/00_set_devel_R; "
### start a new remoter server
start_rr(m, preload = preload)
check_rr(m)
kill_rr(m)
### Example: for module load on supercomputers
preload <- "module load r; " # e.g. via module load r
start_rr(m, preload = preload)
check_rr(m)
kill_rr(m)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab