Learn R Programming

DCEM (version 1.0.0)

remove_node: remove_node: Part of DCEM package.

Description

Removes the given node from the heap structure. This function is for internal use and is called by the dcem_star_cluster_uv (univariate data) and dcem_star_cluster_mv (multivariate data).

Usage

remove_node(heap, node_key, index)

Arguments

heap

(dataframe): The dataframe holding the heap structure.

node_key

(numeric): The key corresponding to the node to be removed.

index

(numeric): The index of the node to be removed.

Value

data frame: The heap with node removed.

References

Using data to build a better EM: EM* for big data.

Hasan Kurban, Mark Jenne, Mehmet M. Dalkilic (2016) <doi:https://doi.org/10.1007/s41060-017-0062-1>.

Examples

Run this code
# NOT RUN {
# Create a sample data frame
heap <- data.frame(keys=c(0,3,4), vals=c(7,7,4))

# Build the heap from the data frame.
heap <- build_heap(heap)

# Remove a node from the heap (key=3).
remove_node(heap, 3, 2)

# }

Run the code above in your browser using DataLab