show_concepts: Show SAFE dataset metadata

Description Usage Arguments Value Functions Examples

View source: R/metadata.R

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').

Usage

1
2
3
4
5
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

Examples

1
2
3
4
5
6
7
8
9
   safedir <- system.file('example_data_dir', package='safedata')
   set_safe_dir(safedir, update=FALSE, validate=FALSE)
   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)

ImperialCollegeLondon/safe_data documentation built on Oct. 8, 2019, 4:27 p.m.