A central S3 class that defines a data.frame
where columns given in
id_cols
define distinct soil profiles.
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")
#>
#> A cfp_profile object
#> id_cols: site
#> 2 unique profiles
#>
#> site variable
#> 1 site_a 1
#> 2 site_a 2
#> 3 site_b 3
#> 4 site_b 4
### 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"))
#>
#> A cfp_profile object
#> id_cols: site replicate
#> 4 unique profiles
#>
#> site replicate variable
#> 1 site_a 1 1
#> 2 site_a 2 2
#> 3 site_a 1 3
#> 4 site_a 2 4
#> 5 site_b 1 5
#> 6 site_b 2 6
#> 7 site_b 1 7
#> 8 site_b 2 8