checkAllAnswers: check whether all numbers in a likert scale are given

Description Usage Arguments Details Examples

View source: R/Likert.R

Description

check whether all numbers in a likert scale are given

Usage

1

Arguments

x

a (non-empty) numeric vector of data values.

Details

The vector must contain integer numbers. It works by checking if the difference between items is equal to 1 (it gives you back 'Yes') or not (it gives you back 'No')

Examples

1
2
3
4
5
6
# vector with all values ranging from 0 to 9 (all values == Yes)
x <- c(1,2,3,4,5,6,7,8,9,4,3,2,5,4,1,1,2,3,4,7,8,7,NA,1,2,3,5,4,0,6,7,5,4,5,6)
checkAllAnswers(x)
# vector with all values ranging from 0 to 9 (all values == No)
y <- c(0,2,3,5,6,7,8,9,8,5,6,7,5,3,2,0,3,5,6,7,6,NA)
checkAllAnswers(y)

alemiani/explora documentation built on May 28, 2019, 4:54 p.m.