r_helpers module

TERMPORARILY DISABLED UNTIL A SERVICE IN DAPLA LAB WITH R AND PYTHON FOR VSCODE EXISTS.

This module contains utility functions for R-related tasks in the SSB Dash Framework.

hb_method(data, p_c, p_u, p_a, id_field_name='id', x_1_field_name='x1', x_2_field_name='x2')

Runs the Hb method from the R package Kostra.

Parameters:
  • data (DataFrame) – The data to run the method on

  • p_c (int) – The value of pC

  • p_u (float) – The value of pU

  • p_a (float) – The value of pA

  • id_field_name (str) – The name of the id field

  • x_1_field_name (str) – The name of the first x field

  • x_2_field_name (str) – The name of the second x field

Return type:

DataFrame

Returns:

The result of the method

th_error(data, id_field_name, x_1_field_name, x_2_field_name)

Runs the ThError method from the R package Kostra.

Parameters:
  • data (DataFrame) – The data to run the method on

  • id_field_name (str) – The name of the id field

  • x_1_field_name (str) – The name of the first x field

  • x_2_field_name (str) – The name of the second x field

Return type:

DataFrame

Returns:

The result of the method