mark_ego_graph: Function earmark the companies in the neighbourhood of a...

View source: R/company_hierarchy.R

mark_ego_graphR Documentation

Function earmark the companies in the neighbourhood of a company, this neighbourhood is sometimes called [ego graphs](http://mathworld.wolfram.com/NeighborhoodGraph.html)

Description

Function earmark the companies in the neighbourhood of a company, this neighbourhood is sometimes called [ego graphs](http://mathworld.wolfram.com/NeighborhoodGraph.html)

Usage

mark_ego_graph(graph, id_company, target_attribute, distance = 1,
  direction = "in")

Arguments

graph

A graph containing company/company relations data.

id_company

A company id of which you want to mark the neighbourhood

target_attribute

The name of the new attribute you want to mark the neighborhood in

distance

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

direction

The direction to calculate the propagated value from (can be "in", "out", "all")

Value

A graph containing the newly added neighbourhood marking attribute

Examples

graph_all_companies <- mark_ego_graph(graph_all_companies, id_company = "910716048", target_attribute = "is_neighbour")

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