expand_until_switch: Check Expand Flag After Treatment Switch

View source: R/data_extension.R

expand_until_switchR Documentation

Check Expand Flag After Treatment Switch

Description

Check if patients have switched treatment in eligible trials and set expand = 0.

Usage

expand_until_switch(s, n)

Arguments

s

numeric vector where 1 indicates a treatment switch in that period

n

length of s

Value

Vector of indicator values up until first switch.


TrialEmulation documentation built on Aug. 25, 2026, 5:08 p.m.