retain.Rd
Retain values within primary keys
retain(df, value_var, event, outside = NA)
data frame in which to apply the retain.
variable containing the value to be retained.
flag to trigger the retain.
value to.
ADLB <- radlb(radsl(N = 10, na_percentage = 0), na_vars = list()) ADLB$BASE2 <- random.cdisc.data:::retain( df = ADLB, value_var = ADLB$AVAL, event = ADLB$ABLFL2 == "Y" )