Learn R Programming

DCEM (version 1.0.0)

get_leaves: get_leaves: Part of DCEM package.

Description

Return the leaf nodes 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

get_leaves(heap)

Arguments

heap

(dataframe): The dataframe holding the heap structure.

Value

data frame: A data frame containing the key, value pairs for the leaves.

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).
get_leaves(heap)

# }

Run the code above in your browser using DataLab