convertVectToBinary {inTextSummaryTable} | R Documentation |
Convert vector to a bincode of 0/1 based on consecutive values in the vector.
Description
Convert vector to a bincode of 0/1 based on consecutive values in the vector.
Usage
convertVectToBinary(x)
Arguments
x |
Vector. |
Value
Integer vector of same length than x
.
Author(s)
Laure Cougnaud
Examples
x <- c("group1", "group1", "group1", "group2", "group2", "group3", "group4", "group4")
convertVectToBinary(x = x)
[Package inTextSummaryTable version 3.3.3 Index]