cfp_profile: Object for soil profiles

View source: R/cfp_profile.R

cfp_profileR Documentation

Object for soil profiles

Description

A central S3 class that defines a data.frame where columns given in id_cols define distinct soil profiles.

Usage

cfp_profile(x, id_cols = NULL)

Arguments

x

A data.frame

id_cols

Column names in data.frame that uniquely identify each profile.

Value

A cfp_profile object. This is a data.frame with the id_cols attribute.

See Also

Other data formats: cfp_dat(), cfp_gasdata(), cfp_layered_profile(), cfp_layers_map(), cfp_soilphys()

Examples

df <- data.frame(
  site = rep(c("site_a", "site_b"), each = 2),
  variable = 1:4)

cfp_profile(df, id_cols = "site")

### multiple id_cols
df <- data.frame(
  site = rep(c("site_a", "site_b"), each = 4),
  replicate = rep(c(1,2), times = 4),
  variable = 1:8)

cfp_profile(df, id_cols = c("site", "replicate"))

valentingar/ConFluxPro documentation built on Dec. 1, 2024, 9:35 p.m.