Get the Relational Division of 2 Columns

DESCRIPTION:

Given a Value column and a Group column, determine which values belong to a given Membership as defined by a set of Group values.

This function requires the bigdata library section to be loaded.

USAGE:

bd.relational.divide(data, value, group, membership)

REQUIRED ARGUMENTS:

data
a bdFrame or data.frame.

OPTIONAL ARGUMENTS:

value
name or number of the data set column to the dividend. If NULL, this specifies the first column that is not the group column.
group
name or number of the data set column to be the divisor. If NULL, this specifies all of the data set columns.
membership
names of group levels that define membership. If NULL, this specifies all of group's levels.

VALUE:

A bdFrame or data.frame containing the value elements that satisfy the membership.

DETAILS:

This function takes two inputs ( bdFrame or data.frame ). The output contains the value elements that satisfy the membership .

SEE ALSO:

EXAMPLES:

## Get the weekdays with Light and Moderate traffic
traffic <- c("Light", "Moderate", "Heavy")
week.congestion <- data.frame(weekdays=c(1,2,3,1),
                              traffic=as.factor(traffic[c(1,2,2,2)]))
bd.relational.divide(week.congestion, 1, "traffic", c("Light", "Moderate"))