dataBank {patterncausality} | R Documentation |
Data Bank Initialization Function
Description
Initializes various data structures for storing and managing data within a complex systems analysis framework.
Usage
dataBank(type, dimensions)
Arguments
type |
A character string specifying the type of data structure to initialize: "array", "vector", "matrix", or "neighborhood memories". Each structure serves different requirements for data storage and processing in the model. |
dimensions |
An integer vector specifying the dimensions of the data structure. The interpretation of dimensions varies based on the type:
|
Value
db Returns the initialized data structure, filled with NA values. Depending on the 'type', the structure can be an array, vector, matrix, or a specialized data frame designed for neighborhood memories which incorporates extensive details about interactions within defined neighborhoods.
Examples
# Initialize a matrix with 3 rows and 5 columns.
matrix_db <- dataBank("matrix", c(3, 5))
print(matrix_db)
# Initialize a neighborhood memory structure correctly with sufficient column names.
dimensions_nm <- c(4, 40, 3, 5)
nm_db <- dataBank("neighborhood memories", dimensions_nm)
print(nm_db)