OR: Basic OR function from excel

Description Usage Arguments Value Examples

View source: R/OR.R

Description

It acts similiarly to Excel's OR function. Logical operator where if at least only one logical is true it returns true.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
OR(
  logical1,
  logical2 = FALSE,
  logical3 = FALSE,
  logical4 = FALSE,
  logical5 = FALSE,
  logical6 = FALSE,
  logical7 = FALSE,
  logical8 = FALSE,
  logical9 = FALSE,
  logical10 = FALSE,
  logical11 = FALSE,
  logical12 = FALSE,
  logical13 = FALSE,
  logical14 = FALSE,
  logical15 = FALSE,
  logical16 = FALSE,
  logical17 = FALSE,
  logical18 = FALSE,
  logical19 = FALSE,
  logical20 = FALSE,
  logical21 = FALSE,
  logical22 = FALSE,
  logical23 = FALSE,
  logical24 = FALSE,
  logical25 = FALSE,
  logical26 = FALSE,
  logical27 = FALSE,
  logical28 = FALSE,
  logical29 = FALSE,
  logical30 = FALSE,
  logical31 = FALSE,
  logical32 = FALSE
)

Arguments

logical1, logical2, logical3, logical4, logical5, logical6, logical7, logical8, logical9, logical10, logical11, logical12, logical13, logical14, logical15, logical16, logical17, logical18, logical19, logical20, logical21, logical22, logical23, logical24, logical25, logical26, logical27, logical28, logical29, logical30, logical31, logical32

Give the function a logical argument. The one that returns either TRUE or FALSE.

Value

In this example either if species is virginica or sepal length is more than 6 then it returns true. Function will always return logical class.

Examples

1
OR(iris$Species == "virginica",iris$Sepal.Length > 6)

ExcelFunctionsR documentation built on July 1, 2020, 8:35 p.m.