Description Usage Arguments Value
View source: R/helper_functions.R
A helper function to assign region names to a single type of stimuli. If data only has one stimuli, this function is called directly to assign region names; otherwise, it is called repeatedly for each subset of data corresponding to a stimuli type.
1 2 | name_regions_in_subset(dat, reg.names, region.col, reg.names.col = reg.name,
missing.prefix = "Reg_")
|
dat |
data.frame to add region names to |
reg.names |
named character vector, where names correspond to the new region names to be assigned, and the values correspond to current region identifiers |
region.col |
unquoted name of the column containing current region identifiers |
reg.names.col |
unquoted name of the coumn with region names which will be added to the data; "reg.name" by default |
missing.prefix |
what to prefix to region identifiers for which the user didn't specify names explicitly. Defaults to "Reg_", i.e. if region identifiers are numbers, it would generate something like "Reg_1". |
data.frame with the added reg.name
column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.