cartesian_2D: Cartesian Product of Two Vectors

Description Usage Arguments Value Comment Examples

View source: R/Cartesian.R

Description

Function cartesian_2D takes two vectors as input and returns the two dimensional cartesian product.

Usage

1
cartesian_2D(array_x, array_y)

Arguments

array_x

A vector, indicating the first set.

array_y

A vector, indicating the second set.

Value

A matrix of length(array_x) * length(array_y) rows and two columns. Each row indicates an ordered pair.

Comment

cartesian_2D is used internally in other function(s) of ROCit. Works if matrix/data frames are passed as arguments. However, returns might not be valid if arguments are not one dimensional.

Examples

1
2
3
x <- seq(3)
y <- c(10,20,30)
cartesian_2D(x,y)

ROCit documentation built on July 1, 2020, 11:28 p.m.