xasc: Sort a dataframe by a (or more) column key(s)

Usage Arguments Value Author(s) Examples

View source: R/xasc.R

Usage

1
xasc(d, cols)

Arguments

d

A dataframe

cols

A vector of character giving the column keys

Value

A dataframe, sorted ascendingly by keys

Author(s)

JFP

Examples

1
2
3
4
5
6
7
8
  d <- data.frame(
    date=seq(as.Date("2001-01-01"), as.Date("2001-12-01"), by="month"),
    ticker=sample(c("1 HK", "2 HK"), 12, TRUE),
    price=100+rnorm(12)
  )

  d %>% 
    xasc(c("date", "ticker")) 

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