lj: Lower join

Description Usage Arguments Value Author(s) See Also Examples

View source: R/lj.R

Description

The lj (left join) verb joins tables on the key columns of its right argument. The left argument is a table, and the right argument is a keyed table, where the key columns must be a subset of the columns of the left argument.

Usage

1
lj(x, y, keep.y=FALSE)

Arguments

x

A dataframe.

y

A keyed dataframe. key attribute can be set by xkey function.

keep.y

a boolean whether or not keeping non matching y records in the result

Value

A dataframe

Author(s)

JFP

See Also

uj and xkey

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  x <- data.frame(a=c(1,2,3),
                  b=c("x", "y", "z"),
                  c=c(10, 20, 20)
  )
  y <- data.frame(a=c(1,3),
                  b=c("x", "z"),
                  c=c(1,2),
                  d=c(10,20))
  
  x %>% lj(y %>% xkey(c("a", "b")))
  

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