combine: Combine 2 questions together

Description Usage Arguments Examples

View source: R/RecodeR.R

Description

This function is to combine 2 questions together. The returned value should have no duplicate and excessive comma.

Usage

1
combine(vector1, vector2)

Arguments

vector1

character vector

vector2

character vector

Examples

1
2
3
vector1 <- c("1", "2", NA, NA)
vector2 <- c("3", "2,3,4", NA, "1")
combine(vector1, vector2) #"1,3"   "2,3,4" ""      "1"

momo3246/recode documentation built on Sept. 30, 2020, 2:14 p.m.