QCA (version 3.6)

fuzzyand, fuzzyor: Logical operations

Description

These functions perform logical operations AND and OR, for binary crisp or fuzzy set membership scores.

Usage

fuzzyand(..., na.rm = FALSE, use.tilde = FALSE)

fuzzyor(..., na.rm = FALSE, use.tilde = FALSE)

Arguments

...

Two or more numerical (calibrated) objects containing membership scores, or a matrix / data frame of calibrated columns.

na.rm

Logical, indicating whether missing values should be removed.

use.tilde

Logical, construct the expression in the name attribute using a tilde to signal a negation.

Value

A numerical vector of class "fuzzy", with a name attribute expression

Examples

Run this code
# NOT RUN {
# -----
# Cebotari & Vink (2013, 2015)

# DEMOC*GEOCON*NATPRIDE
with(CVF, fuzzyand(DEMOC, GEOCON, NATPRIDE))

# same thing with
fuzzyand(CVF[, c(1,3,5)])

# DEMOC*geocon*NATPRIDE
fa <- with(CVF, fuzzyand(DEMOC, 1 - GEOCON, NATPRIDE))
fa

attr(fa, "name")


# ETHFRACT + POLDIS
with(CVF, fuzzyor(ETHFRACT, POLDIS))

# same thing with
fuzzyor(CVF[, c(2,4)])

# ETHFRACT + poldis
fo <- with(CVF, fuzzyor(ETHFRACT, 1 - POLDIS))
fo

attr(fo, "name")


# ETHFRACT + ~POLDIS
fo <- with(CVF, fuzzyor(ETHFRACT, 1 - POLDIS, use.tilde = TRUE))
attr(fo, "name")

# }

Run the code above in your browser using DataLab