Skip to content

Commit 2708ca7

Browse files
committed
document composite key for traitsview
1 parent 6fc317f commit 2708ca7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

R/data.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
#' Columns are ordered with key analytical fields first (trait, mean, units,
88
#' scientificname, genus) and ID columns last.
99
#'
10+
#' The view is a UNION of traits and yields tables in BETYdb,
11+
#' so the unique row identifier is the composite key `(result_type, id)`,
12+
#' not `id` alone. A given `id` value can appear once under
13+
#' `result_type = "traits"` and once under `result_type = "yields"`.
14+
#'
1015
#' @format A tibble with 43,532 rows and 35 columns.
1116
#' Key columns: trait, mean, units, scientificname, genus, sitename, author.
17+
#' Unique row key: (result_type, id).
1218
#' Use `names(traitsview)` to see all columns.
1319
#' @source <https://betydb.org>, exported from traits_and_yields_view
1420
#' @seealso [species], [sites], [variables], [citations]

0 commit comments

Comments
 (0)