pipe_find_factors: Find factors

pipe_find_factorsR Documentation

Find factors

Description

Fields may be from the original data and/or fields created by the app, e.g. 'n' (frequency). When field is 'label', 'value' can contain a vector of search terms separated by ' OR '.

Text searches are case-insensitive.

Usage

pipe_find_factors(
  graf,
  field = "label",
  value,
  operator = "contains",
  up = 1,
  down = 1,
  remove_isolated = F,
  highlight_only = F
)

Arguments

field

Field (column, variable) to search

value

Value to search for

operator

c('contains','notcontains','=','notequals','greater','less','starts','ends'). How to search.

up

integer. Default is 0.

down

integer. Default is 0.

Value

A mapfile containing only matching factors; if 'up'!=0 then also factors this number of steps upstream of the matching factors are also included and likewise for 'down'!=0. The links are filtered correspondingly to return only the "ego network" i.e. links between the returned factors.

If operator and field are both NULL, the value is treated as a simple search string for the field 'label'.

Examples

pipe_find_factors(example2,field="label",value="Flood",operator="contains")
pipe_find_factors(example2,value="Flood") %>% make_interactive_map
pipe_find_factors(example2,value="Flood")
pipe_find_factors(example2,field="id",value=5,operator="greater")

stevepowell99/CausalMapFunctions documentation built on Oct. 12, 2023, 11:13 a.m.