show_concepts: Show SAFE dataset metadata

View source: R/metadata.R

show_conceptsR Documentation

Show SAFE dataset metadata

Description

These functions provide access to the metadata associated with SAFE datasets. The functions provide three levels of information:

show_concepts

displays the record versions grouped under dataset concepts,

show_record

displays summary information about a specific record, and

show_worksheet

displays metadata about data worksheet fields within a record.

All three functions accept a first argument obj, which can be one of three things:

  1. A character or numeric vector of SAFE dataset records or concepts, which will be validated using validate_record_ids, or

  2. An already validated safe_record_set object, or

  3. A safedata data frame loaded using load_safe_data.

If show_concepts is passed a record id, then the function looks up the relevant concept. The version table indicates which versions are available ("*" for the most recent available version and "o" for older available versions), and which are unavailable due to embargo or retriction ("x"). A "!" is used to show that a private local copy of an embargoed or restricted dataset has been inserted using insert_dataset.

Usage

show_concepts(obj)

show_record(obj)

show_worksheet(obj, worksheet = NULL, extended_fields = FALSE)

Arguments

obj

A reference to SAFE records or a loaded worksheet (see above)

worksheet

The name of a worksheet to show. Obviously, if obj is a loaded worksheet, that will be the worksheet described and this can be left as NULL.

extended_fields

Logical - show a compact description of worksheet fields or a longer output including full metadata descriptors.

Value

Invisibly, a SAFE metadata object or a list of such objects. These are not really intended for end user consumption.

Functions

  • show_concepts(): Show the records associated with a dataset concept.

  • show_record(): Show details of a specific dataset

  • show_worksheet(): Show details of a data worksheet

Examples

   set_example_safedata_dir()
   recs <- validate_record_ids(c(1400562, 3266827, 3266821))
   show_concepts(recs)
   show_record(recs[1,])
   # Show worksheet metadata from a record or from a loaded worksheet
   show_worksheet(1400562, "EnvironVariables")
   beetle_abund <- load_safe_data(1400562, "Ant-Psel")
   show_worksheet(beetle_abund, extended_fields = TRUE)
   set_example_safedata_dir(on=FALSE)

ImperialCollegeLondon/safe_data documentation built on Jan. 27, 2024, 9:51 a.m.