filter_cens: Filter variable for existing data

View source: R/filter_cens.R

filter_censR Documentation

Filter variable for existing data

Description

Filter variable where there are existing data in other variable.

Usage

filter_cens(x, y)

Arguments

x

Variable to be filtered.

y

Condition variable.

Value

Filtered variable.

Examples

df <- data.frame(
  cars = 1:3,
  cars_model = 4:6,
  cars_speed = 7:9,
  condition = c(NA, 1, 2)
)
dplyr::mutate_at(
  df,
  dplyr::vars(dplyr::starts_with("cars")),
  filter_cens, y = df$condition
)

swehip/shprplotfun documentation built on Oct. 21, 2022, 8:26 a.m.