Skip to contents

The CoreEngine R6 class is used to harmonize methods across different data specific engines. Users should not use this class directly but data specific engines.

Note

The engine data is saved in an rds file and loaded in the app. If save file is defined in the engine it is used, otherwise the save file name is automatically set to the engine class name and the date in the format rds. Changes made in the app can be saved in the rds file and then loaded to continue working on the engine by scripting.

Active bindings

Metadata

A Metadata or EngineMetadata. When setting can also be a named list with elements of length one.

Workflow

A Workflow S7 class object. When settings can also be a list of ProcessingStep objects or a full path string to an rds or json file containing a Workflow object.

Analyses

An Analyses S7 class object or a child of it.

Results

A named list of Results S7 class objects or a child of it.

AuditTrail

An AuditTrail S7 class object. Only getter method.

Config

An EngineConfig S7 class object.

Methods


Method new()

Creates a CoreEngine R6 class object.

Usage

CoreEngine$new(metadata = NULL, workflow = NULL, analyses = NULL, ...)

Arguments

metadata

A named list or a Metadata object. Each list element must have length one. There is no type restrictions except for name (must be type character), author (must be type character) and date (must be class POSIXct or POSIXt). A file entry must be a character string with a full path to a file.

workflow

A Workflow object, a list of ProcessingStep objects or a character string with a full path to a rds or json file containing a Workflow.

analyses

An Analyses child class or a data specific analyses input. See each data specific engine for details.

...

Additional arguments for data specific engines.


Method clear_cache()

Clears the cache.

Usage

CoreEngine$clear_cache(value = NULL)

Arguments

value

A character vector with the names of the cache categories to clear. An integer vector with the indices of the categories to clear can alternatively be given to remove categories. If NULL (the default), the entire cache is cleared. Use the method get_cache_info to get the cached categories.


Method clear_results()

Clears all result objects in the Analyses field.

Usage

CoreEngine$clear_results()


Method get_cache_info()

Gets a data.table with the cached data categories.

Usage

CoreEngine$get_cache_info()


Method get_cache_size()

Gets the current size of the cache file.

Usage

CoreEngine$get_cache_size()


Method has_analyses()

Checks if there are analyses files/objects in the Analyses field.

Usage

CoreEngine$has_analyses()


Method has_results()

Checks if there are Results in the Analyses field.

Usage

CoreEngine$has_results(value = NULL)

Arguments

value

A string or a vector of strings with the name/s of the Results child/s for checking the presence.


Method load()

Loads engine data from an sqlite or rds file.

Usage

CoreEngine$load(file = NA_character_)

Arguments

file

A string with the full file path of the sqlite or rds file.

Returns

Invisible.


Method print()

Prints a summary to the console.

Usage

CoreEngine$print()


Method save()

Saves the engine data as an sqlite or rds file. If no file path is given, the engine data is saved in the file of the Metadata field. If no file is specified in the Metadata the engine data is saved as rds format with the engine class and date in the Metadata as file name.

Usage

CoreEngine$save(file = NA_character_)

Arguments

file

A string with the full file path of the sqlite or rds file.

Returns

Invisible.


Method run()

Runs a processing method defined by the ProcessingStep object.

Usage

CoreEngine$run(step = NULL)

Arguments

step

A ProcessingStep object.


Method run_workflow()

Runs all ProcessingStep objects in the Workflow.

Usage

CoreEngine$run_workflow()


Method run_app()

Runs the StreamFind Shiny app to explore, process and manage the engine data.

Usage

CoreEngine$run_app()


Method clone()

The objects of this class are cloneable with this method.

Usage

CoreEngine$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.