Skip to content

When outliers are removed, the x-axis grid cannot be modified. #100

@Samve

Description

@Samve

dat2 <- KHCE
l <- lapply(
split(ADLB, ADLB$ID),
function(x) coef(lm(AVAL ~ ADAY, data = x))[2])
new_slopes <- do.call(rbind, l)
new_slopes <- as.data.frame(new_slopes)
names(new_slopes) <- "LINEAR"
new_slopes$ID <- as.numeric(row.names(new_slopes))
dat2 <- merge(KHCE, new_slopes, by = "ID", all.x = TRUE)
dat2$AVAL0[dat2$PARAMCD == "eGFR"] <- dat2$LINEAR[dat2$PARAMCD == "eGFR"]
dat2$AVAL0[is.na(dat2$AVAL0)] <- 0
dat2 <- as_hce(dat2)
calcWO(dat2)

plot(dat2, last_outcome = "eGFR slope", remove_outliers = F, continuous_grid_spacing_x =.1) # Modifies the grid
plot(dat2, last_outcome = "eGFR slope", remove_outliers = T, continuous_grid_spacing_x =.1) # does not have any effect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions