filter_df: Filter a Data Frame

Description Usage Arguments Value See Also Examples

View source: R/filter_df.R

Description

Filter a data frame based on any character variable, including varaibles from meta data, without having to conduct joins or string arguments yourself.

Usage

1
2
3
4
5
6
7
filter_df(
  dataframe,
  var = label,
  include = c(""),
  exclude = c(""),
  location_data = data_meta
)

Arguments

var

The varaible which to filter (not in quotation marks)

include

Character list; the list of values to keep for the data frame (optional if exclude specified)

exclude

Character list; the list of values to remove from the data frame (optional if include specified)

location_data

Optional, unless var not in dataset; the data set containing monitor meta data

dataset

The dataset which to filter

Value

Data frame filtered by the specifications above

See Also

Other miscellaneous functions: adjust_timezone(), ambient_temperature(), apply_date_tags(), apply_hour_tags(), column_dt(), group_stad(), organize_stad(), rounding_w_zeroes(), unit_convert(), wrangle_meta()

Examples

1
2
filter_df(july_api_diurnal, hour_tag, include = c("Morning", "Afternoon"))
filter_df(july_api_diurnal, label, exclude = c("Lighthouse"), location_data = july_api_meta)

gmcginnis/AirVizR documentation built on Dec. 20, 2021, 11:49 a.m.