stw_mutate_dict: Modify descriptions in data-dictionary

Description Usage Arguments Details Value Examples

View source: R/stw_mutate_dict.R

Description

Use this function to modify the descriptions in a data-dictionary, using syntax along the same lines as dplyr::mutate().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
stw_mutate_dict(...)

## Default S3 method:
stw_mutate_dict(...)

## S3 method for class 'stw_dict'
stw_mutate_dict(dict, ...)

## S3 method for class 'stw_meta'
stw_mutate_dict(meta, ...)

## S3 method for class 'stw_dataset'
stw_mutate_dict(dataset, ...)

Arguments

...

Name-value pairs of expressions

dict

Object with S3 class stw_dict, contains data-dictionary

meta

Object with S3 class stw_meta, contains meta-data

dataset

Object with S3 class stw_dataset, a data frame with attached meta-data

Details

You can send a dictionary (stw_dict) object, a metadata (stw_meta) object, or dataset object (stw_dataset) and get back an object of the same class. In other words, if you call this function using a stw_meta object, it will modify the dict within the object, then return a modified copy of thestw_meta object.

Value

modified copy of dict or meta

Examples

1
2
stw_mutate_dict(diamonds_meta$dict, color = "foo")
stw_mutate_dict(diamonds_meta, color = "foo")

uncoast-unconf/steward documentation built on Jan. 7, 2021, 10:38 a.m.