Skip to contents

This function takes a data frame that includes an `embrace_id` column and other columns ending with "technique_tdvh" and starting with "fraction". It processes these columns to determine if ICIS should be "TRUE" or "FALSE" for each `embrace_id`, converting it into a numerical indicator (1 or 0) in a new column named `icis`.

Usage

add_icis(.data)

Arguments

.data

A data frame containing an `embrace_id` column and other columns that end with "technique_tdvh" and start with "fraction". These should contain values that can be transformed into factors.

Value

A data frame with an additional column `icis`, which is a numerical indicator (1 or 0) based on the conditions applied to columns ending with "technique_tdvh" and starting with "fraction".

Examples

if (FALSE) { # \dontrun{
df <- data.frame(embrace_id = c(1, 2, 3),
                 fraction_1_technique_tdvh = c("0", "1", "0"),
                 fraction_2_technique_tdvh = c("0", "1", "1"))
add_icis(df)
} # }