View source: R/Creation_Functions.R
createNode | R Documentation |
Create a single node with its property keys, passed as arguments, in a Neo4j database.
createNode(connection, node_label, property_keys = NULL)
connection |
The Neo4j connection object. |
node_label |
The node label. |
property_keys |
The node property keys, in the form of dataframe. |
The result from the Neo4j call.
## Not run:
#Get the dataframe of nodes to be created
nodes = prepareNodesDataframeToCreate(wntBiopax,wntmully)
#Create all nodes in the Neo4j database
for(row in 1:nrow(nodes)){
node_property_keys = nodes[row, names(nodes) != "label"]
na_cells = which(is.na(node_property_keys))
names_not_na = names(node_property_keys)[-na_cells]
node_property_keys = as.data.frame(node_property_keys[,-na_cells])
colnames(node_property_keys) = names_not_na
createNode(connection,nodes[row,'label'],node_property_keys)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.