prop.unequal: Proportion of unequal elements

View source: R/prop.unequal.R

prop.unequalR Documentation

Proportion of unequal elements

Description

Compares the first element in vector x to the first element in vector y, the second element in x to the second element in y, and so forth, and returns the proportion of elements which are not equal.

Usage

prop.unequal(x, y, na.rm = FALSE)

Arguments

x

First vector to be compared

y

Second vector to be compared

na.rm

a logical value indicating positions should be excluded if they are NA in at least one of the vectors.

Value

numeric value that is proportion of corresponding elements that are not equal.

Examples

prop.unequal(c(1,2,3), c(1,3,3))
prop.unequal(c(1,2,3), c(1,3,NA))
prop.unequal(c(1,2,3), c(1,3,NA), na.rm=TRUE)

sfraundorf/psycholing documentation built on April 23, 2022, 2:50 a.m.