cross: Apply a function on the cartesian product of two lists

Description Usage Arguments Value Author(s) Examples

View source: R/cross.R

Description

Apply a function on the cartesian product of two lists

Usage

1
cross(x, y, FUN = function(x, y) c(x, y))

Arguments

x

a list or vector

y

a list or vector

FUN

A binary function

Value

A list of computed values for each item of the cartesian product of x and y

Author(s)

JFP

Examples

1
2
3
  cross(1:3, 2:7)
  cross(1:3, 2:7, c) 
  cross(1:3, 2:7, function(x,y)x+y)

HikaGenji/fql documentation built on April 12, 2021, 8:36 a.m.