xkey: Set the primary keys in a table

Usage Arguments Value Author(s) See Also Examples

View source: R/xkey.R

Usage

1
xkey(d, keys)

Arguments

d

A dataframe

keys

A character vector of column keys

Value

A dataframe with a key attribute

Author(s)

JFP

See Also

lj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  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.