reportcompiler.plugins.source_parsers.r

r.py

This module includes the context generator using R.

Classes

  • RParser: Context generator for R scripts.
class reportcompiler.plugins.source_parsers.r.RParser

Context generator for R scripts.

Inheritance

Inheritance diagram of RParser
generate_context(doc_param, data, metadata)

Generates the dictionary context.

Parameters:
  • doc_param (OrderedDict) – Document variable
  • data (pandas.DataFrame) – Pandas dataframe (or list of dataframes) with the specified input data
  • metadata (dict) – Document metadata (overriden by fragment metadata when specified)
Returns:

Dictionary with context for the template rendering stage

Return type:

dict

retrieve_fragment_metadata(doc_param, metadata)

Retrieves the metadata required to process the fragment.

Parameters:
  • doc_param (OrderedDict) – Document variable
  • metadata (dict) – Document metadata (overriden by fragment metadata when specified)
Returns:

Dictionary with metadata

Return type:

dict