cumsum_by_level {forestry}R Documentation

calculate cumsum for input level

Description

calculate cumsum for input level

Usage

cumsum_by_level(input_tree, level_num, attri_name)

Arguments

input_tree

input tree

level_num

level of tree for cumsum

attri_name

name of this cummulative count field

Value

tree with calculated cumsum for input level

Examples

data(exercise_df)
exercise_node <- data.tree::as.Node(exercise_df)
cumsum_by_level(exercise_node, 3, "exercise_time")


[Package forestry version 0.1.1 Index]