select_ego_graphs: Function to find the companies neighboring a company in a...

View source: R/company_hierarchy.R

select_ego_graphsR Documentation

Function to find the companies neighboring a company in a hierarchy for a list of companies, sometimes called [ego graphs](http://mathworld.wolfram.com/NeighborhoodGraph.html)

Description

This function searches the graphs of a vector of companies for their complete hierarchies from a graph containing containing a multitude of company hierarchies.

Usage

select_ego_graphs(graph_companies, id_companies, distance = 1,
  only_children = FALSE)

Arguments

id_companies

A vector of company id's of which you want to retrieve the whole hierarchy

distance

The number of 'hops' in the company network that should be included, default = 1

only_children

A boolean indicating whether only children should be included or (grand)parents as well

graph_all_companies

A graph containing all company/company relations data.

Details

The graphs will contain a vertex attribute is_searched_company which specifies whether it the vertex represents a company which was selected

Value

A list of graphs containing the graphs the ego graph of the specific companies

Examples

lst_company_ego_graphs <- select_ego_graphs(graph_all_companies, "910716048")

mark-me/graydon.package documentation built on Nov. 14, 2023, 5:31 p.m.