parse_depth_column: Parse depth column in a data frame

View source: R/utils.R

parse_depth_columnR Documentation

Parse depth column in a data frame

Description

Applies parse_depth() row-wise and appends Depth_num and Depth_label columns.

Usage

parse_depth_column(df, depth_col = "depth")

Arguments

df

A data frame.

depth_col

Name of the depth column (character string).

Value

The input data frame with two extra columns: Depth_num (numeric midpoint) and Depth_label (factor, ordered by depth).

Examples

df <- data.frame(depth = c("0-5", "5-15", "15-30"), x = 1:3)
parse_depth_column(df, "depth")


soilFlux documentation built on Dec. 4, 2026, 5:10 p.m.