Learn R Programming

genvar (version 0.0.1.4)

keepif: keeps some rows in the dataset and drops the rest

Description

keeps some rows in the dataset and drops the rest

Usage

keepif(x)

Arguments

x

a condition like: "var1==2" in which case observations that satisfy the condition are kept and all others are removed.

Value

returns NULL, invisibly

Examples

Run this code
# NOT RUN {
use(cars, clear=TRUE)
keepif("speed <= 20")
listif()
# }

Run the code above in your browser using DataLab