setspell: creates spells and run-lengths

Description Usage Arguments Value Examples

View source: R/setspell-setspell_selected.R

Description

creates spells and run-lengths, by reference

Usage

1
setspell(dtx, grp, var1, pos = "end", max = TRUE)

Arguments

dtx

A data.table

grp

Grouping variables within-which to calculate on

var1

Variable to calcute run- and spell-lengths on.

pos

Where should the variables be located in the data.table?

max

Should the DT include the max run and spell lengths?

rename

Should the spells and run-lengths be named after the original variable or generically named? (mostly used as TRUE with the setspell_selected variable)

Value

This function creates, by reference, four variables with run- and spell-length-type information.

Examples

1
2
3
4
## Not run: 
function(arg1)

## End(Not run)

emilBeBri/dttools documentation built on April 21, 2021, 5:44 a.m.