Beispiel #1
0
def get_response_content(fs):
    # check the r table
    RUtil.RTable(fs.table.splitlines())
    # make the plot
    device = Form.g_imageformat_to_r_function[fs.imageformat]
    image_data = RUtil.run_plotter_concise(fs.table, g_script_body, device)
    return image_data
Beispiel #2
0
def get_response_content(fs):
    # check the r table
    RUtil.RTable(fs.table.splitlines())
    # make the plot
    device = Form.g_imageformat_to_r_function[fs.imageformat]
    image_data = RUtil.run_plotter_concise(
            fs.table, g_script_body, device)
    return image_data
Beispiel #3
0
def process(args, table_lines):
    """
    @param args: command line or web input
    @param table_lines: input lines
    @return: the image data as a string
    """
    # get the table string
    rtable = RUtil.RTable(table_lines)
    plot_info = PlotInfo(args, rtable.headers, rtable.data)
    augmented_lines = plot_info.get_augmented_table_lines()
    table_string = '\n'.join(augmented_lines)
    # get the script string
    script_string = plot_info.get_script(args)
    # get the device
    device = Form.g_imageformat_to_r_function[args.imageformat]
    # run R and get the image data
    image_data = RUtil.run_plotter_concise(table_string, script_string, device)
    # return the image data
    return image_data
Beispiel #4
0
def process(args, table_lines):
    """
    @param args: command line or web input
    @param table_lines: input lines
    @return: the image data as a string
    """
    # get the table string
    rtable = RUtil.RTable(table_lines)
    plot_info = PlotInfo(args, rtable.headers, rtable.data)
    augmented_lines = plot_info.get_augmented_table_lines()
    table_string = '\n'.join(augmented_lines)
    # get the script string
    script_string = plot_info.get_script(args)
    # get the device
    device = Form.g_imageformat_to_r_function[args.imageformat]
    # run R and get the image data
    image_data = RUtil.run_plotter_concise(table_string, script_string, device)
    # return the image data
    return image_data