df_get_val_integer Function

public function df_get_val_integer(df, row_index, col_index) result(val)

Get single integer value from data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(in) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index

Return Value integer(kind=ik)


Source Code

    function df_get_val_integer(df, row_index, col_index) result(val)
        type(data_frame), intent(in) :: df
        integer, intent(in) :: row_index, col_index
        integer(ik) :: val

        type(column) :: data_col

        if (col_index < 1 .or. col_index > df % ncols()) error stop "column index out of range"

        data_col = df % get_data_col(col_index)
        if (data_col % get_type() /= INTEGER_NUM) error stop "column is not integer type"

        val = data_col % geti(row_index)
    end function df_get_val_integer