Learn R Programming

genvar (version 0.0.2.0)

listif: prints the part of the dataset that satisfies certain conditions

Description

prints the part of the dataset that satisfies certain conditions

Usage

listif(cond, vars, ...)

Arguments

cond

a conditional expression; only observations that satisfy the condition will be returned.

vars

a variable list; only variables in the list will be returned.

...

other options, currently ignored

Value

the part of the dataset that satisfies the condition and contains the specified columns

Examples

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

Run the code above in your browser using DataLab