cartesian_2D {ROCit}R Documentation

Cartesian Product of Two Vectors

Description

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

Usage

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

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



[Package ROCit version 2.1.2 Index]