Learn R Programming

netknitr (version 0.2.1)

getNodes: getNodes

Description

Generate nodes for the input data frame, returns data frame of possible nodes and its IDs for the further process.

Usage

getNodes(crude_data, columns_for_nodes = NULL, group = FALSE)

Value

Data frame, each unique item is a node and associated with unique id

Arguments

crude_data

Data Frame that you want to build a network for.

columns_for_nodes

Vector of column names for crude_data, works well for at least 3 columns

group

Logical value, set TRUE to differentiate nodes by shapes and colors. Default value is FALSE

Author

Jayachandra N

Examples

Run this code
getNodes(head(mtcars), c("cyl", "gear", "vs"), group = TRUE)

Run the code above in your browser using DataLab