takeAction method

void takeAction()

Implementation

void takeAction() {
  // Run the R scripts.

  if (selectedTransform == 'Constant' && ref.read(imputedProvider) == '') {
    showOk(
      context: context,
      title: 'No Constant Value',
      content: '''

          To impute missing data to a constant value for this variable you
          need to specify the constant value. Please provide a Constant and
          try again.

          ''',
    );
  } else {
    switch (selectedTransform) {
      case 'Mean':
        rSource(context, ref, ['transform_impute_mean_numeric']);
      case 'Median':
        rSource(context, ref, ['transform_impute_median_numeric']);
      case 'Mode':
        rSource(context, ref, ['transform_impute_mode']);
      case 'Constant':
        rSource(context, ref, ['transform_impute_constant']);
      default:
        showUnderConstruction(context);
    }
  }
}