Learn R Programming

RLogicalOps (version 0.1)

processLogiOper: Processing Logical Operations

Description

Dynamically process the logical operations over a list of string and get the result

Usage

processLogiOper(logicalOperation, stringList)

Arguments

logicalOperation
A String containing the logical operation to be performed
stringList
A list of String over which the logical operation is to be performed

Value

A list of the output values(0/1)

Examples

Run this code
logicalOperation <- "AND(Cake,OR(Birthday,Anniversary))"
stringList <- c("The cake at the birthday was awesome."
                ,"Their anniversary was last week.")

processLogiOper(logicalOperation, stringList)

Run the code above in your browser using DataLab