r_script#

Attributes#

Classes#

RScript

This object provides a generic interface to executing an R script using an

Module Contents#

r_script.LOGGER[source]#
class r_script.RScript(root_path)[source]#

This object provides a generic interface to executing an R script using an `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 = 'Rscript'[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]#
_read_raw_json(filename)[source]#