Runs nvar on a data frame with new variables defined by TDA
expressions, and returns the frame with them added. This is the way
to the operators of the manual's 5.2.6 that have no R counterpart:
the change and count operators (change, cntch), the
aggregates over blocks (gcnt, grec, gmean,
gstd, ...), TDA's random numbers, and so on.
Examples
d <- data.frame(ID = c(1, 1, 2), S = c(1, 3, 2))
tda_derive(d, CH = "change(S)", CN = "cntch(S)")
#> ID S CH CN
#> 1 1 1 1 3
#> 2 1 3 1 3
#> 3 2 2 1 3
tda_derive(d, CN = "cntch(S)", block = "ID")
#> ID S CN
#> 1 1 1 2
#> 2 1 3 2
#> 3 2 2 1