xgroup: Group a dataframe into a list of dataframe along keys

Usage Arguments Value Author(s) Examples

View source: R/xgroup.R

Usage

1
xgroup(d, cols)

Arguments

d

A dataframe

cols

A character vector of column keys

Value

A list of dataframe

Author(s)

JFP

Examples

1
2
3
4
5
6
7
8
  d <- rbind(data.frame(date="20140101", ticker= 2, price=3),
             data.frame(date="20140102", ticker= 2, price=2),
             data.frame(date="20140101", ticker= 1, price=5))
  d %>% xcols(c("ticker", "price"))
  # xdesc, xcol, xcols
  d %>% xdesc(c("date", "price")) 
  # xgroup and each
  d %>% xgroup(c("date", "price")) 

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