The Engine R6 class is used to harmonize the interface across different data types for data management and processing.
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
MetadataA Metadata object. When setting it can also be a named list with elements of length one.
WorkflowA Workflow S3 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.
AnalysesAn Analyses S3 class object or a child for a specific data type.
ResultsA named list of Results S3 class objects or a child for specific results.
AuditTrailAn AuditTrail S3 class object. Only getter method.
ConfigAn EngineConfig S3 class object.
typeA character string with the data type of the engine. This is a read-only field.
Methods
Method new()
Creates an Engine R6 class object.
Usage
Engine$new(metadata = NULL, workflow = NULL, analyses = NULL, ...)Arguments
metadataA named list or a
Metadataobject. 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.workflowA
Workflowobject, a list ofProcessingStepobjects or a character string with a full path to a rds or json file containing aWorkflow.analysesAn
Analyseschild class or a data specific analyses input. See each data specific engine for details....Additional arguments passed to the method, internal use only.
Method clear_cache()
Clears the cache.
Arguments
valueA 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 methodget_cache_infoto get the cached categories.
Method has_results()
Checks if there are Results in the Analyses field.
Arguments
valueA 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.
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.
Method run()
Runs a processing method defined by the ProcessingStep object.
Arguments
stepA ProcessingStep object.
Method run_app()
Runs the StreamFind Shiny app to explore, process and manage the engine data.