remove_code: Remove particular code(s)

Description Usage Arguments Examples

View source: R/RecodeR.R

Description

This function is to remove code(s) in either SA or MA question

Usage

1

Arguments

vector

character vector (MA question) or single numeric value (SA question)

remove

character string (only 1 code to remove) or character vector (more than 1 code to remove)

Examples

1
2
3
remove_code(c("1", "2,4", "3,5"), remove=c(2,3))#remove more than 1 code in MA question; "1" "4" "5"
remove_code(c("1", "2,4", "3,5"), remove=2)#remove only 1 code in MA question; "1"   "4"   "3,5"
remove_code(c(1, 2, 3), remove=3)#remove 1 code in SA question; "1" "2" ""

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