byCtss: Apply functions to identical CTSSes.

Description Usage Arguments Examples

Description

.byCTSS is a private function using data.table objects to preform grouping operations at a high performance. These functions use non-standard evaluation in a context that raises warnings in R CMD check. By separating these functions from the rest of the code, I hope to make the workarounds easier to manage.

Usage

1
2
3
4
.byCtss(ctssDT, colName, fun)

## S4 method for signature 'data.table'
.byCtss(ctssDT, colName, fun)

Arguments

ctssDT

A data.table representing CTSSes.

colName

The name of the column on which to apply the function.

fun

The function to apply.

Examples

1
2
3
4
5
6
7
ctssDT <- data.table::data.table(
  chr       = c("chr1", "chr1", "chr1", "chr2"),
  pos       = c(1     , 1     , 2     , 1     ),
  strand    = c("+"   , "+"   , "-"   , "-"   ),
  tag_count = c(1     , 1     , 1     , 1     ))
ctssDT
CAGEr:::.byCtss(ctssDT, "tag_count", sum)

CAGEr documentation built on Jan. 17, 2021, 2 a.m.