datafort_accessors Module

DataFort Accessors Module

This module provides standalone functions for accessing and modifying data frame columns and values. All functions take a data_frame as the first argument instead of being type-bound procedures.

Functions

Column Append Functions

  • df_append_real/integer/logical/character/complex(df, col, header) - Add column

Get Column Functions

  • df_get_col_real/integer/logical/character/complex(df, col_index) - Get entire column

Get Value Functions

  • df_get_val_real/integer/logical/character/complex(df, row, col) - Get single value

Set Column Functions

  • df_set_col_real/integer/logical/character/complex(df, col_index, col) - Set entire column

Set Value Functions

  • df_set_val_real/integer/logical/character/complex(df, row, col, val) - Set single value


Functions

public function df_get_col_character(df, index) result(col)

Get character column by index

Arguments

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

Return Value character(len=:), dimension(:), allocatable

public function df_get_col_complex(df, index) result(col)

Get complex column by index

Arguments

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

Return Value complex(kind=rk), dimension(:), allocatable

public function df_get_col_integer(df, index) result(col)

Get integer column by index

Arguments

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

Return Value integer(kind=ik), dimension(:), allocatable

public function df_get_col_logical(df, index) result(col)

Get logical column by index

Arguments

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

Return Value logical, dimension(:), allocatable

public function df_get_col_real(df, index) result(col)

Get real column by index

Arguments

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

Return Value real(kind=rk), dimension(:), allocatable

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

Get single character 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 character(len=:), allocatable

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

Get single complex 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 complex(kind=rk)

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)

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

Get single logical 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 logical

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

Get single real 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 real(kind=rk)


Subroutines

public subroutine df_append_character(df, col, header)

Append a character-valued column to the data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
character(len=*), intent(in), dimension(:) :: col
character(len=*), intent(in), optional :: header

public subroutine df_append_complex(df, col, header)

Append a complex-valued column to the data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
complex(kind=rk), intent(in), dimension(:) :: col
character(len=*), intent(in), optional :: header

public subroutine df_append_integer(df, col, header)

Append an integer-valued column to the data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer(kind=ik), intent(in), dimension(:) :: col
character(len=*), intent(in), optional :: header

public subroutine df_append_logical(df, col, header)

Append a logical-valued column to the data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
logical, intent(in), dimension(:) :: col
character(len=*), intent(in), optional :: header

public subroutine df_append_real(df, col, header)

Append a real-valued column to the data frame

Read more…

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
real(kind=rk), intent(in), dimension(:) :: col
character(len=*), intent(in), optional :: header

public subroutine df_set_col_character(df, col_index, col)

Set entire character column by index

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: col_index
character(len=*), intent(in), dimension(:) :: col

public subroutine df_set_col_complex(df, col_index, col)

Set entire complex column by index

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: col_index
complex(kind=rk), intent(in), dimension(:) :: col

public subroutine df_set_col_integer(df, col_index, col)

Set entire integer column by index

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: col_index
integer(kind=ik), intent(in), dimension(:) :: col

public subroutine df_set_col_logical(df, col_index, col)

Set entire logical column by index

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: col_index
logical, intent(in), dimension(:) :: col

public subroutine df_set_col_real(df, col_index, col)

Set entire real column by index

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: col_index
real(kind=rk), intent(in), dimension(:) :: col

public subroutine df_set_val_character(df, row_index, col_index, val)

Set single character value in data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index
character(len=*), intent(in) :: val

public subroutine df_set_val_complex(df, row_index, col_index, val)

Set single complex value in data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index
complex(kind=rk), intent(in) :: val

public subroutine df_set_val_integer(df, row_index, col_index, val)

Set single integer value in data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index
integer(kind=ik), intent(in) :: val

public subroutine df_set_val_logical(df, row_index, col_index, val)

Set single logical value in data frame

Arguments

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

public subroutine df_set_val_real(df, row_index, col_index, val)

Set single real value in data frame

Arguments

Type IntentOptional Attributes Name
type(data_frame), intent(inout) :: df
integer, intent(in) :: row_index
integer, intent(in) :: col_index
real(kind=rk), intent(in) :: val