make_composite_field: Create a composite metadata field by merging existing data.

Description Usage Arguments Value See Also Examples

Description

This function, given target metadata, will create a new composite column based on two or more existing columns in the target data. The new field will be named based on the merged fields and will be delimited using the "_" character. Requires that target data has been prepared with prep_targets().

Usage

1
make_composite_field(merge_fields)

Arguments

merge_fields

Column names in targets data to be included in the new composite column. Should be provided as a set of strings. I.E. c("field1","field2").

Value

This function returns target data containing the newly created composite field.

See Also

prep_targets

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 

myCounts <- prep_counts(count_input="master_count_data.txt", delim="t")
myTargets <- prep_targets(target_input="master_count_data.txt", delim="t")

#Create a composite field based on "treatment" and "time" fields.
myTargets <- make_composite_field(targets=myTargets,
                                  merge_fields=c("treatment","time"))


#Create a composite field based on "treatment", "time", and "patientID" fields.
myTargets <- make_composite_field(targets=myTargets,
                                  merge_fields=c("treatment","time","patientID"))



## End(Not run)

DEVis documentation built on May 2, 2019, 3:18 p.m.