Skip to contents

table cross join

Usage

crossjoin(t1, t2)

Arguments

t1

table 1

t2

table 2

Value

crossjoin()

Examples

 exampleDataR = data.table::as.data.table(exampleDataR)
location_list = exampleDataR[,.N,list(location)]
item_list = exampleDataR[,.N,list(item)]
crossjoin(t1=location_list, t2=item_list)
#>      item  N location i.N
#> 1: coffee 30 istanbul  30
#> 2:    tea 30 istanbul  30
#> 3: coffee 30   ankara  30
#> 4:    tea 30   ankara  30