View source: R/Removal_Functions.R
removeRelationship | R Documentation |
Delete a relationship between 2 nodes in the Neo4j graph. If no relationship property keys are given as argument, all relationships between the 2 nodes are deleted.
removeRelationship(
connection,
started_node_property,
started_node_property_value,
end_node_property,
end_node_property_value,
relationship_property_keys = NULL
)
connection |
The Neo4j connection object. |
started_node_property |
The started node property key name to be identified by. |
started_node_property_value |
The started node property key value to be found within. |
end_node_property |
The end node property key name to be identified by. |
end_node_property_value |
The end node property key value to be found within. |
relationship_property_keys |
The relationship property keys, in the form of dataframe. |
The result from the Neo4j call.
## Not run:
#Get the dataframe of relationships to be created
relationships = prepareRelationshipsDataframeToCreate(wntmully,nodes)
#Delete all relationships in the Neo4j database
for(row in 1:nrow(relationships)){
removeRelationship(connection, "name", relationships[row,'V1'], "name", relationships[row,'V2'])
}
#Delete the relationships started from the node of name Complex10 and ended
in the node of name Protein1 in the Neo4j database
removeRelationship(connection, "name", "Complex10", "name", "Protein1")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.