set_percentile_limits: Return rows which values lie within a specified percentile...

Description Usage Arguments Details Value Examples

View source: R/filtering_functions.R

Description

Use set_percentile_limits to find rows of a dataframe whose values lies within a specified percentile interval of selected variable.

Usage

1
set_percentile_limits(df, var, min_pct, max_pct)

Arguments

df

the data frame to transform

var

the column corresponding to selected variable

min_quant

lower boundary percentile

max_quant

upper boundary percentile

Details

This function is compatible with dplyr. Use this to set limits on continuous variables within your data.

Value

A filtered dataframe, containing only rows meeting specified condition.

Examples

1
2
3
# Limiting the inference population to the middle 50% of schools in terms of their
# percentage of female students (using the post-secondary data).
set_limits(df = ipeds, var = PCT_Female, min_pct = 25, max_pct = 75)

katiecoburn/thegeneralizer documentation built on July 6, 2020, 11:54 a.m.