Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

filter_data

Filter data with user-specified expression


Description

Filter data with user-specified expression

Usage

filter_data(dataset, filt = "", drop = TRUE)

Arguments

dataset

Data frame to filter

filt

Filter expression to apply to the specified dataset

drop

Drop unused factor levels after filtering (default is TRUE)

Details

Filters can be used to view a sample from a selected dataset. For example, runif(nrow(.)) > .9 could be used to sample approximately 10

Value

Filtered data frame

Examples

select(diamonds, 1:3) %>% filter_data(filt = "price > max(.$price) - 100")
select(diamonds, 1:3) %>% filter_data(filt = "runif(nrow(.)) > .995")

radiant.data

Data Menu for Radiant: Business Analytics using R and Shiny

v1.3.12
AGPL-3 | file LICENSE
Authors
Vincent Nijs [aut, cre]
Initial release
2020-11-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.