Description Usage Arguments Examples
View source: R/rneo4_functions.R
This function Checks to see if a node already exists with the label/id combination; if not, it adds the node to Neo4j; if so, it attempts update the node based on the properties in the row. The neo4j graph must be called "graph". In order for the update portion to work, a constraint must be set on the label/id combination. Example: addConstraint(graph, "vendor", "DUNSNumber")
1 | add_or_update_nodes(df, label, id, props = NULL, verbose = FALSE, na.act = F)
|
label: |
The label to assign to each node (takes a character value) |
id: |
column name in dataframe required for a node to be created (takes a character value) |
props: |
column names(s) in dataframe of node properties (takes a character vector); defaults to NULL |
verbose: |
if TRUE, returns information about each node being added to the graph DB; defaults to False |
na.act: |
not currently used...maybe in the future; defaults to False |
1 | add_or_update_nodes(awarded_contracts, "contract", "DUNSNumber", props = names(awarded_contracts), verbose = T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.