aggRviz_filter2: Filter aggregated data to a chosen level

Description Usage Arguments Details Value Examples

View source: R/aggRviz_filter2.R

Description

The columns to delete are the features that you DO NOT want to stratify by. This function filters out any row, stratified by those columns, and filters out any unstratified rows from the other features.

Usage

1
2
3
aggRviz_filter2(data, col_2_delete = NULL, col_2_keep = NULL,
  features = NULL, all_symbol = "", fix_place = TRUE,
  places = c("State.or.Province", "Region", "Country"))

Arguments

data

data.frame

col_2_delete

vector

col_2_keep

vector

features

vector

all_symbol

character

fix_place

logical

places

vector

Details

OPTION: col_2_keep lets you filter "in"

Option: if it's not a blank for all categories, set all_symbol This could be NA, or " " or "all".

Option: if you set features, it will only delete columns in that set

Option: fix_place allows you to deal with nested places, that is State.or.Province is in Region is in Country. For now, these are the 3 fixed places: places[1] subset places[2] subset places[3]

In future release, this will be a variable number of places! but for now it only works with 3 (ordered) places

Value

data.frame

Examples

1
2
3
4
load("../example_data/yummy.Rda")
dat_1

aggRviz_filter2(data = dat_1,col_2_delete= c("Dessert", "Fruit"))

amygoldlist/aggRviz documentation built on May 16, 2019, 11:10 p.m.