Get logical column by index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(data_frame), | intent(in) | :: | df | |||
integer, | intent(in) | :: | index |
function df_get_col_logical(df, index) result(col) type(data_frame), intent(in) :: df integer, intent(in) :: index logical, dimension(:), allocatable :: col type(column) :: data_col if (index < 1 .or. index > df % ncols()) error stop "column index out of range" data_col = df % get_data_col(index) if (data_col % get_type() /= LOGICAL_NUM) error stop "column is not logical type" col = data_col % getl() end function df_get_col_logical