EveStr {GrpString} | R Documentation |
Converts sequences of event names to strings - same length
Description
EveStr converts event names in a data frame to a string vector. In the data frame, each row, which has the same number of event names, is converted to a string based on the conversion key. A string vector is exported. As a result, in the vector, each converted string has the same length.
Usage
EveStr(eveName.df, eveName.vec, char.vec)
Arguments
eveName.df |
Data frame that stores event names to be converted. |
eveName.vec |
Event name vector in a conversion key. |
char.vec |
Character vector in a conversion key. |
Details
The lengths of eveName.vec and char.vec are the same.
Each element (event name) in eveName.vec corresponds to an element (character) in char.vec.
An element in char.vec can be a letter, digit, or a special character.
Value
The function returns a string vector.
See Also
Examples
# small number of event names
event.df <- data.frame(c("aoi_1", "aoi_2"),
c("aoi_1", "aoi_3"),
c("aoi_3", "aoi_5"))
event.name.vec <- c("aoi_1", "aoi_2", "aoi_3", "aoi_4", "aoi_5")
label.vec <- c("a", "b", "c", "d", "e")
EveStr(event.df, event.name.vec, label.vec)
# more event names
data(event1s.df)
data(eventChar.df)
EveStr(event1s.df, eventChar.df$event, eventChar.df$char)
[Package GrpString version 0.3.2 Index]