This class facilitates the processing and evaluation of indicators on a dataset by leveraging a database engine. It is designed to work with data frames and ensures efficient handling of operations, including validation of unique identifiers and saving results.

RuleEngine(df, unique_identifier_column, database_path = ":memory:")

Arguments

df

Data frame. Data frame object in which you want to process the indicators.

unique_identifier_column

Character. Name of the column containing the unique identifiers for the provided dataframe (there can be no repeated values in this column).

database_path

Character. Path where you want to save the database needed to calculate the indicators. By default ":memory:" (in memory).

Value

A RuleEngine Object.

Examples

if (FALSE) { # \dontrun{
df <- read.csv("dataset.csv", sep = "|", header = TRUE)
reng <- RuleEngine(df,"hospitalization_id")

df2 <- read.csv("dataset2.csv", sep = "|", header = TRUE)
reng2 <- RuleEngine(df2,"episode_id","./indicators.duckdb")
} # }