Shortcut for initialisation of data's object model from a t3 or a avdth database.
data_model_initialisation(
data_source = "t3_db",
db_con,
log_file = FALSE,
log_path = NULL,
log_name = "data_model_initialisation",
periode_reference,
countries,
oceans,
sample_type,
trips_selected = NULL
)
Object of class character expected. Identification of data source. By default "t3_db" but you can switch to "avdth_db".
Database connection R object expected. Mandatory argument for data source "t3_db", "avdth_db" and "sql_query".
Object of class logical expected. Initiation or not for log file creation. By default FALSE (no).
Object of class character expected. Path of the log file directory. By default NULL.
Object of class character expected. Name of the log file. By default "data_model_initialisation".
Object of class integer expected. Year(s) of the reference period coded on 4 digits. By default NULL.
Object of class character expected. ISO code on 3 letters related to one or more countries. By default NULL.
Object of class integer expected. Ocean(s) related to data coded on 1 digit. By default NULL.
(integer) Sample type identification (landing, observer, ...). By default NULL.
Object of class character expected. Additional parameter only used with data source "t3_db". Use trip(s) identification(s) for selected trip(s) kept in the query (by periode of reference and countries). By default NULL.
The function return a list with two R6 reference object inside: one class "object_model_data" and the second class "object_full_trips".