/** Reads a value from the data */
  public Double getValue(DataRow data) throws Exception {
    Double value;

    if (varName != null) {
      value = data.getVarDoubleValue(varName);
    } else if (function != null) {
      value = function.evaluate(data);
    } else {
      return null;
    }

    return value;
  }