convertVectToBinary: Convert vector to a bincode of 0/1 based on consecutive...

View source: R/flextable-getListing.R

convertVectToBinaryR 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)

inTextSummaryTable documentation built on June 22, 2024, 9:24 a.m.