create_relabel_field: Create a new metadata field by renaming existing levels of an...

Description Usage Arguments Value See Also Examples

Description

This function, given a target metadata field, will create a new column based on that field that has different labels. This is particularly useful when cleaning figures for publication quality, as often labels will contain abbreviations or delimiting characters such as "_". This function allows for a new column to be generated with more human-friendly labels that can be fed into visualizations instead of the defaults. Requires that target data has been prepared with prep_targets().

Usage

1
create_relabel_field(target_column, new_column_name)

Arguments

target_column

Column name in targets data to be included in the new column. String.

new_column_name

Name for the new column that will be created. String.

Value

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

See Also

prep_targets

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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  field based on the "treatment_time" fields with new labels.
myTargets <- create_relabel_field(target_column="treatment_time",
                                 new_column_name="treatment_time_relabel")


## End(Not run)

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