Learn R Programming

DCEM (version 1.0.0)

insert_node: insert_node: Part of DCEM package.

Description

Implements node insertion in 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

insert_node(heap, node)

Arguments

heap

(dataframe): The dataframe holding the heap structure.

node

(vector): A vector containing the key, value pair.

Value

data: The heap with the new node.

References

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

Hasan Kurban, Mark Jenne, Mehmet M. Dalkilic (2016) <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), vals=c(7))

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

# Insert a new node in the heap.
heap <- insert_node(heap, c(1,2))

# }

Run the code above in your browser using DataLab