fql-package: Functional queries for R

Description Details Author(s) See Also Examples

Description

Modelled after kdb/q, a replacement for dplyr, data.table and the likes. Pure R implementation, 0 dependency on external package.

Details

Package: fql
Type: Package
Version: 1.0
Date: 2014-10-24
License: 4 (pun intended)

~~ An overview of how to use the package, including the most important functions ~~

Author(s)

JFP

Maintainer: jperreton@gmail.com ~~ The author and/or maintainer of the package ~~

See Also

~~ Optional links to other man pages, e.g. ~~ ~~ <pkg> ~~

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  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)
  )
  
  e <- data.frame(ticker=c("1 HK", "2 HK"), sector=c("CD", "IT")) 
  
  d 
    xasc(c("date", "ticker")) 
    update(
      by=list(ticker=expression(ticker)),
      what=list(return=expression(price/xprev(price,1)-1))
    ) 
    lj(e) 
    update(by=list(ticker=expression(ticker)),
           what=list(avgPx=expression(rply(price,3,mean)))) 

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