cumsum_across_level {forestry}R Documentation

cumulative calculation

Description

cumulative calculation

Usage

cumsum_across_level(input_node, attri_name, level_num)

Arguments

input_node

tree

attri_name

name of this cummulative count field

level_num

calculate cummulative value cross the level

Value

tree with cummulative count

Examples

data(exercise_df)
exercise_node <- data.tree::as.Node(exercise_df)
test <- cumsum_across_level(input_node = exercise_node,
                            attri_name = "exercise_time",
                            level_num = 3)
print(test, "cumsum_number", "exercise_time", "level")

[Package forestry version 0.1.1 Index]