fill_NA_level {forestry}R Documentation

fill missing value of a field across a level with 0

Description

fill missing value of a field across a level with 0

Usage

fill_NA_level(input_node, field_name, by_level, fill_with = 0)

Arguments

input_node

input node

field_name

field for this operation

by_level

across this level

fill_with

fill missing value with this value

Value

node with NA filled for the input field at input level

Examples

data(exercise_df)
exercise_node <- data.tree::as.Node(exercise_df)
result <- fill_NA_level(input_node = exercise_node,
                        field_name = "exercise_time",
                        by_level = 2,
                        fill_with = "quarterly")
print(result, "exercise_time")


[Package forestry version 0.1.1 Index]