1 ppam_exe = function(path=".", np=parallel::detectCores(), data=NULL, args="DontLetMeEmpty")
3 command_line = paste("mpirun -np ",np," ",path,"/ppam.exe cluster",sep="")
5 #if data provided (as data.frame or matrix...): binarize it, and add it as first argument
8 if (!is.character(data))
10 #assuming matrix or data.frame, WITH row names (identifiers; could be line number...)
11 write.csv(data, "/tmp/data_csv", row.names=TRUE, col.names=FALSE)
12 system(paste(path,"/ppam.exe serialize /tmp/data_csv /tmp/data_bin 0 0",sep=""))
15 system(paste(path,"/ppam.exe serialize ",data," /tmp/data_bin 0 0",sep=""))
17 command_line = paste(command_line," /tmp/data_bin",sep="")
20 command_line = paste(command_line," ",args,sep="")