get_z_hubs: Get most important hubs for each Z factor

View source: R/accessors.R

get_z_hubsR Documentation

Get most important hubs for each Z factor

Description

Get most important hubs for each Z factor

Usage

get_z_hubs(fa, hubs_per_factor = 10, factors = 1:fa$rank)

get_y_hubs(fa, hubs_per_factor = 10, factors = 1:fa$rank)

Arguments

fa

A vsp_fa() object.

hubs_per_factor

The number of important nodes to get per latent factor. Defaults to 10.

factors

The specific columns to index into. The most reliable option here is to index with an integer vector of column indices, but you could also use a character vector if columns have been named. By default returns all factors/singular vectors.

Value

A tibble::tibble() where each row corresponds to a single hub, and three columns:

  • id: Node id of hub node

  • factor: Which factor that node is a hub for. Nodes can be hubs of multiple factors.

  • loading: The actual value of the hubs factor loading for that factor.

Functions

  • get_y_hubs(): Get most important hubs for each Y factor

Examples


data(enron, package = "igraphdata")

fa <- vsp(enron, rank = 30)
fa

get_z_hubs(fa)
get_y_hubs(fa)


RoheLab/vsp documentation built on Nov. 6, 2024, 10:08 p.m.