append_column_study: Append study column with study name

Description Usage Arguments Value Examples

View source: R/master-table.R

Description

Append column named 'study' to data, with all values as the study name. Does not change the data if a 'study' column already exists.

Usage

1

Arguments

data

Data frame or tibble.

name

Name of the study.

Value

Tibble with the data and appended study column.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
dat <- data.frame(
  foo = c("bar0", "bar1", "bar2"),
  bar = c("foo0", "foo1", "foo2")
)
study_dat <- append_column_study(dat, "cool_study")
# Now has study column so cannot change study column
# value with this function
study_dat <- append_column_study(study_dat, "neato_study")

## End(Not run)

Sage-Bionetworks/NicolesCurationTools documentation built on May 5, 2020, 8:29 a.m.