add_to_metadata: Add new items to metadata

Description Usage Arguments Value Author(s) Examples

View source: R/add_to_metadata.R

Description

Add new items to metadata, effectively a dplyr::bind_rows on top of current metadata

Usage

1
2
add_to_metadata(metadata = meta, code, name, label = NA, value = NA,
  class = "numeric")

Arguments

metadata

metadata data.frame

code

variable code of the new var in data

name

a more expressive variable name

label

vector of labels for each value

value

each value as a vector

class

class of the new vector as numeric, factor or character

Value

data.frame

Author(s)

Markus Kainu <markuskainu@gmail.com>

Examples

1
2
3
4
 ## Not run: 
 add_to_metadata(metadata=meta, code = "sex", name = "Repondents sex", label=c("male","female"), value=c(1:2), class="factor")
 
## End(Not run)

muuankarski/tidymetadata documentation built on May 23, 2019, 10:53 a.m.