def run_figure(self, code_str, graphics_dev, width, height, excluded_inputs=set(['source'])): fname = self.interpreter.filePool.create_file(prefix='vtr', suffix='.' + graphics_dev) r_temp_files.append(fname) robjects.r[graphics_dev](file=fname, width=width, height=height) self.run_code(code_str, use_input=True, excluded_inputs=excluded_inputs) robjects.r['dev.off']() image_file = File() image_file.name = fname image_file.upToDate = True self.setResult('imageFile', image_file)
def set_result(self, path): persistent_path = File() persistent_path.name = path persistent_path.setResult('value', self) persistent_path.upToDate = True self.setResult("value", persistent_path)