app.model.lib.r_script#

Classes#

RScript

A generic interface to executing an R script.

Module Contents#

class app.model.lib.r_script.RScript(root_path)[source]#

A generic interface to executing an R script.

It uses the Rscript executable found in the PATH. It expects to be given a root directory (likely a temporary one) where it’ll look for its input files and produce its outputs.

root_path[source]#
rscript_exe = None[source]#
run(script_path, *args)[source]#
write_csv(filename, df)[source]#
write_json(filename, data)[source]#
read_key_value_json(filename, key_name, value_name)[source]#
read_flat_json(filename, discard_keys=[])[source]#
get_r_version()[source]#
get_growthrates_version()[source]#