# Introduction to Rcatch22

## Trent Henderson

### 2026-06-15

    library(Rcatch22)

`Rcatch22` is an R package for the calculation of 22 CAnonical Time-series CHaracteristics (catch). The package is an efficient implementation that calculates time-series features coded in C.

## Core calculation function

The main function of the package is `catch22_all` which automates the computation of the 22 features. This can be run in a one-liner:

    data <- rnorm(100)
    outs <- catch22_all(data)

Taking a look at the returned dataframe, we can see a nice tidy data structure:

    outs
    ##                                          names       values
    ## 1                           DN_HistogramMode_5  0.792488416
    ## 2                          DN_HistogramMode_10 -0.041156798
    ## 3                                    CO_f1ecac  1.570599212
    ## 4                               CO_FirstMin_ac  1.000000000
    ## 5                     CO_HistogramAMI_even_2_5  0.076370371
    ## 6                                CO_trev_1_num -0.313500968
    ## 7                         MD_hrv_classic_pnn40  0.969696970
    ## 8             SB_BinaryStats_mean_longstretch1  8.000000000
    ## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.002210659
    ## 10                   PD_PeriodicityWang_th0_01  5.000000000
    ## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.081356719
    ## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  1.000000000
    ## 13              FC_LocalSimple_mean1_tauresrat  1.000000000
    ## 14               DN_OutlierInclude_p_001_mdrmd -0.230000000
    ## 15               DN_OutlierInclude_n_001_mdrmd -0.340000000
    ## 16            SP_Summaries_welch_rect_area_5_1  0.205602046
    ## 17            SB_BinaryStats_diff_longstretch0  4.000000000
    ## 18                   SB_MotifThree_quantile_hh  2.176790792
    ## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.285714286
    ## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.828571429
    ## 21            SP_Summaries_welch_rect_centroid  1.914408023
    ## 22                 FC_LocalSimple_mean3_stderr  1.102545503

### catch24

An option to include the mean and standard deviation as features in addition to `catch22` is available through setting the `catch24` argument to `TRUE`:

    outs2 <- catch22_all(data, catch24 = TRUE)
    outs2
    ##                                          names       values
    ## 1                           DN_HistogramMode_5  0.792488416
    ## 2                          DN_HistogramMode_10 -0.041156798
    ## 3                                    CO_f1ecac  1.570599212
    ## 4                               CO_FirstMin_ac  1.000000000
    ## 5                     CO_HistogramAMI_even_2_5  0.076370371
    ## 6                                CO_trev_1_num -0.313500968
    ## 7                         MD_hrv_classic_pnn40  0.969696970
    ## 8             SB_BinaryStats_mean_longstretch1  8.000000000
    ## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.002210659
    ## 10                   PD_PeriodicityWang_th0_01  5.000000000
    ## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.081356719
    ## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  1.000000000
    ## 13              FC_LocalSimple_mean1_tauresrat  1.000000000
    ## 14               DN_OutlierInclude_p_001_mdrmd -0.230000000
    ## 15               DN_OutlierInclude_n_001_mdrmd -0.340000000
    ## 16            SP_Summaries_welch_rect_area_5_1  0.205602046
    ## 17            SB_BinaryStats_diff_longstretch0  4.000000000
    ## 18                   SB_MotifThree_quantile_hh  2.176790792
    ## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.285714286
    ## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.828571429
    ## 21            SP_Summaries_welch_rect_centroid  1.914408023
    ## 22                 FC_LocalSimple_mean3_stderr  1.102545503
    ## 23                                     DN_Mean -0.196221254
    ## 24                               DN_Spread_Std  0.906410840

## Feature list

A list of the time-series features included in `Rcatch22` can be viewed using the included `feature_list` vector:

    Rcatch22::feature_list
    ##  [1] "DN_HistogramMode_5"
    ##  [2] "DN_HistogramMode_10"
    ##  [3] "CO_f1ecac"
    ##  [4] "CO_FirstMin_ac"
    ##  [5] "CO_HistogramAMI_even_2_5"
    ##  [6] "CO_trev_1_num"
    ##  [7] "MD_hrv_classic_pnn40"
    ##  [8] "SB_BinaryStats_mean_longstretch1"
    ##  [9] "SB_TransitionMatrix_3ac_sumdiagcov"
    ## [10] "PD_PeriodicityWang_th0_01"
    ## [11] "CO_Embed2_Dist_tau_d_expfit_meandiff"
    ## [12] "IN_AutoMutualInfoStats_40_gaussian_fmmi"
    ## [13] "FC_LocalSimple_mean1_tauresrat"
    ## [14] "DN_OutlierInclude_p_001_mdrmd"
    ## [15] "DN_OutlierInclude_n_001_mdrmd"
    ## [16] "SP_Summaries_welch_rect_area_5_1"
    ## [17] "SB_BinaryStats_diff_longstretch0"
    ## [18] "SB_MotifThree_quantile_hh"
    ## [19] "SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1"
    ## [20] "SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1"
    ## [21] "SP_Summaries_welch_rect_centroid"
    ## [22] "FC_LocalSimple_mean3_stderr"