R/binary_model_cluster.R

Defines functions binary_model_cluster

Documented in binary_model_cluster

## model wrapper
binary_model_cluster <- function(command) {
    invoke <- function(param) {
        numclust = param[1]
        nparam = length(param)
        input_file_name = paste("input", numclust, sep = "")
        output_file_name = paste("output", numclust, sep = "")
        write.table(param, file = input_file_name, row.names = F, col.names = F, 
            quote = F)
        system2(command, args = as.character(numclust))
        file.remove(input_file_name)
        output = read.table(output_file_name, header = F)
        file.remove(output_file_name)
        output
    }
} 

Try the EasyABC package in your browser

Any scripts or data that you put into this service are public.

EasyABC documentation built on Jan. 6, 2023, 1:14 a.m.