af_contains: Returns whether or not a question, or vector of questions,...

Description Usage Arguments Value Examples

View source: R/af_contains.R

Description

Returns whether or not a question, or vector of questions, exists in the dataset

Usage

1
af_contains(afro, question)

Arguments

afro

A dataframe containing Afrobarometer data

question

A vector of questions

Value

A single boolean that is TRUE only if all questions exist in the dataset

Examples

1
2
3
4
5
# Check to see if question 5 exists
afro %>% af_contains("q5")

#' # Check to see if questions 5 and 30 exist
afro %>% af_contains(c("q5", "q30"))

mdaku/afrobar documentation built on Nov. 4, 2019, 6:23 p.m.