data.table query
R
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
man
tests
vignettes
.Rbuildignore
.gitignore
.gitlab-ci.yml
DESCRIPTION
NAMESPACE
NEWS.md
README.md

README.md

dtq: data.table query Build Status

Current version: 0.1.9.5

  • log data.table query details
    • call
    • sequence
    • environment
    • timing
    • in rows
    • out rows
    • source name
  • control query logging environments
  • read.only attribute for data.table
  • dtq class to store dtq call and metadata

Installation

stopifnot(getRversion() >= "3.2.0")
install.packages("dtq", repos=c("https://jangorecki.gitlab.io/dtq", "https://cran.rstudio.com"))

Usage

See vignette.

library(data.table)
library(dtq)
DT <- data.table(a = 1:10, b = letters[1:5])
LKP <- data.table(b = letters[1:5], ratio = rnorm(5), key = "b")
DT2 <- DT[, .(a = sum(a)), b
          ][a > median(a), .(b, a, adj_a = a * 1.1)]
LKP[DT2, .(b, a, adj2_a = adj_a * ratio)]
dtl()

Control logging by global options:

  • dtq.log.exclude character, exclude queries from provided packages
  • dtq.log.include character, log queries only from provided packages

Unless dtq.log.include option is set the logging is active for all data.table queries excluding calls from data.table and dtq packages.
Otherwise only queries from provided packages will be logged, still excluding packages from dtq.log.exclude option.
While using include option character R_GlobalEnv can be provided to log also calls from global env.

License

GPL-3