Running examples in 'REDCapExporter-Ex.R' failed
The error most likely occurred in:

> ### Name: format_record
> ### Title: Format Record
> ### Aliases: format_record
> 
> ### ** Examples
> 
> 
> data("avs_raw_metadata")
> data("avs_raw_record")
> 
> avs <- format_record(avs_raw_record, avs_raw_metadata, class = "data.frame")
> avs
   record_id uniform_number firstname   lastname hof    nationality   position
1          1              1     David  Aebischer   0          Swiss       Goal
2          2             46      Yuri    Babenko   0           USSR     Center
3          3             45      Rick      Berry   0         Canada    Defence
4          4              4       Rob      Blake   1         Canada    Defence
5          5             77       Ray    Bourque   1         Canada    Defence
6          6              7      Greg   de Vries   0         Canada    Defence
7          7             18      Adam  Deadmarsh   0         Canada Right Wing
8          8             11     Chris    Dingman   0         Canada  Left Wing
9          9             37     Chris      Drury   0            USA  Left Wing
10        10             52      Adam      Foote   0         Canada    Defence
11        11             21     Peter   Forsberg   1        Sweeden     Center
12        12              5      Alex    Gusarov   0           USSR    Defence
13        13             23     Milan     Hejduk   0 Czechoslovakia Right Wing
14        14             13       Dan     Hinote   0            USA     Center
15        15             24       Jon      Klemm   0         Canada    Defence
16        16              9      Brad     Larsen   0         Canada  Left Wing
17        17             29      Eric    Messier   0         Canada  Left Wing
18        18              3     Aaron     Miller   0            USA    Defence
19        19              2     Bryan       Muir   0         Canada    Defence
20        20             39     Ville   Nieminen   0        Finland  Left Wing
21        21             27     Scott     Parker   0            USA Right Wing
22        22             25     Shjon     Podein   0            USA Right Wing
23        23           4-44     Nolan      Pratt   0          Canda    Defence
24        24             63      Joel      Prpic   0         Canada     Center
25        25             14      Dave       Reid   0         Canada Right Wing
26        26             28     Steve Reinprecht   0         Canada     Center
27        27             33   Patrick        Roy   1         Canada       Goal
28        28             19       Joe      Sakic   1         Canada     Center
29        29             44       Rob    Shearer   0         Canada     Center
30        30             41    Martin     Skoula   0 Czechoslovakia    Defence
31        31             40      Alex    Tanguay   0         Canada  Left Wing
32        32             26  Stephane      Yelle   0         Canada     Center
    birthdate height weight shoots catches experience roster_complete gp goals
1  1978-02-07     73    185   <NA>    Left          0        Complete 26     0
2  1978-01-02     73    200   Left    <NA>          0        Complete  3     0
3  1978-11-04     74    210   Left    <NA>          0        Complete 19     0
4  1969-12-10     76    220  Right    <NA>         11        Complete 13     2
5  1960-12-28     71    219   Left    <NA>         21        Complete 80     7
6  1973-01-04     74    205   Left    <NA>          5        Complete 79     5
7  1975-05-10     72    205  Right    <NA>          6        Complete 39    13
8  1976-07-06     76    235   Left    <NA>          3        Complete 41     1
9  1976-08-20     70    191  Right    <NA>          2        Complete 71    24
10 1971-07-10     74    220  Right    <NA>          9        Complete 35     3
11 1973-07-20     72    205   Left    <NA>          6        Complete 73    27
12 1964-07-08     75    185   Left    <NA>         10        Complete  9     0
13 1976-02-14     72    190  Right    <NA>          2        Complete 80    41
14 1977-01-30     72    187  Right    <NA>          1        Complete 76     5
15 1970-01-08     74    205  Right    <NA>          8        Complete 78     4
16 1977-06-28     72    210   Left    <NA>          1        Complete  9     0
17 1973-10-29     74    195   Left    <NA>          4        Complete 64     5
18 1971-08-11     75    210  Right    <NA>          7        Complete 56     4
19 1973-06-08     75    224   Left    <NA>          4        Complete  8     0
20 1977-04-06     71    200   Left    <NA>          1        Complete 50    14
21 1978-01-29     77    240  Right    <NA>         10        Complete 69     2
22 1968-03-05     74    200   Left    <NA>          8        Complete 82    15
23 1975-08-14     75    207   Left    <NA>          4        Complete 46     1
24 1974-09-25     78    225   Left    <NA>          2        Complete  3     0
25 1964-05-15     73    217   Left    <NA>         17        Complete 73     1
26 1976-05-07     72    195   Left    <NA>          1        Complete 21     3
27 1965-10-05     74    185   <NA>    Left         16        Complete 62     0
28 1969-07-07     71    195   Left    <NA>         12        Complete 82    54
29 1976-10-19     70    190  Right    <NA>          0        Complete  2     0
30 1979-10-28     75    226   Left    <NA>         11        Complete 82     8
31 1979-11-21     73    194   Left    <NA>          1        Complete 82    27
32 1974-05-09     74    182   Left    <NA>          5        Complete 50     4
   assists points plusmn pimi goals_ev goals_pp goals_sh goals_gw assists_ev
1        1      1      0    0        0        0        0        0         NA
2        0      0      0    0        0        0        0        0          0
3        4      4      5   38        0        0        0        0          4
4        8     10     11    8        1        1        0        1          6
5       52     59     25   48        3        2        2        0         21
6       12     17     23   51        5        0        0        0         11
7       13     26     -2   59        6        7        0        2          7
8        1      2     -3  108        1        0        0        0          1
9       41     65      6   47       13       11        0        5         22
10      12     15      6   42        1        1        1        1          7
11      62     89     23   54       12       12        2        5         34
12       1      1      2    6        0        0        0        0          1
13      38     79     32   36       28       12        1        9         21
14      10     15      1   51        4        1        0        1          8
15      11     15     22   54        2        2        0        2          6
16       0      0      1    0        0        0        0        0          0
17       7     12     -3   26        5        0        0        1          7
18       9     13     19   29        4        0        0        0          8
19       0      0      0    4        0        0        0        0          0
20       8     22      8   38       12        2        0        3          5
21       3      5     -2  155        2        0        0        1          3
22      17     32      7   68       15        0        0        3         17
23       2      3      2   40        1        0        0        1          2
24       0      0      0    2        0        0        0        0          0
25       9     10      1   21        1        0        0        0          8
26       4      7     -1    2        3        0        0        0          3
27       5      5      0   10        0        0        0        0         NA
28      64    118     45   30       32       19        3       12         34
29       0      0     -2    0        0        0        0        0          0
30      17     25      8   38        5        3        0        2         11
31      50     77     35   37       19        7        1        3         39
32      10     14     -3   20        3        0        1        0         10
   assists_pp assists_sh shots shooting_percentage  toi    atoi
1          NA         NA     0            0.000000 1393 53M 34S
2           0          0     2            0.000000   32 10M 34S
3           0          0    10            0.000000  231  12M 8S
4           2          0    44            4.545455  339  26M 3S
5          31          0   216            3.240741 2088  26M 6S
6           0          1    76            6.578947 1351  17M 6S
7           6          0    86           15.116279  687 17M 38S
8           0          0    33            3.030303  264  6M 26S
9          18          0   204           11.764706 1281  18M 3S
10          5          0    59            5.084746  888 25M 22S
11         24          4   178           15.168539 1518 20M 48S
12          0          0     4            0.000000  135 14M 59S
13         15          2   213           19.248826 1589 19M 52S
14          2          0    69            7.246377  787 10M 21S
15          3          2    97            4.123711 1554 19M 56S
16          0          0     3            0.000000   84  9M 17S
17          0          0    60            8.333333  786 12M 16S
18          0          1    49            8.163265 1032 18M 25S
19          0          0     3            0.000000   66  8M 14S
20          3          0    68           20.588235  622 12M 26S
21          0          0    35            5.714286  394  5M 42S
22          0          0   137           10.948905 1180 14M 23S
23          0          0    26            3.846154  452  9M 50S
24          0          0     0                  NA   29  9M 47S
25          0          1    66            1.515152  721  9M 53S
26          0          1    28           10.714286  328 15M 38S
27         NA         NA     0                  NA 3565 57M 30S
28         27          3   332           16.265060 1887  23M 1S
29          0          0     0                  NA   14  6M 45S
30          6          0   108            7.407407 1697 20M 41S
31         11          0   135           20.000000 1464 17M 51S
32          0          0    54            7.407407  723 14M 28S
   regular_season_scoring_complete wins losses ties_otl goals_against
1                         Complete   12      7        3            52
2                         Complete   NA     NA       NA            NA
3                         Complete   NA     NA       NA            NA
4                         Complete   NA     NA       NA            NA
5                         Complete   NA     NA       NA            NA
6                         Complete   NA     NA       NA            NA
7                         Complete   NA     NA       NA            NA
8                         Complete   NA     NA       NA            NA
9                         Complete   NA     NA       NA            NA
10                        Complete   NA     NA       NA            NA
11                        Complete   NA     NA       NA            NA
12                        Complete   NA     NA       NA            NA
13                        Complete   NA     NA       NA            NA
14                        Complete   NA     NA       NA            NA
15                        Complete   NA     NA       NA            NA
16                        Complete   NA     NA       NA            NA
17                        Complete   NA     NA       NA            NA
18                        Complete   NA     NA       NA            NA
19                        Complete   NA     NA       NA            NA
20                        Complete   NA     NA       NA            NA
21                        Complete   NA     NA       NA            NA
22                        Complete   NA     NA       NA            NA
23                        Complete   NA     NA       NA            NA
24                        Complete   NA     NA       NA            NA
25                        Complete   NA     NA       NA            NA
26                        Complete   NA     NA       NA            NA
27                        Complete   40     13        7           132
28                        Complete   NA     NA       NA            NA
29                        Complete   NA     NA       NA            NA
30                        Complete   NA     NA       NA            NA
31                        Complete   NA     NA       NA            NA
32                        Complete   NA     NA       NA            NA
   shots_against saves save_percentage  gaa so regular_season_goalies_complete
1            538   486       0.9033457 2.24  3                        Complete
2             NA    NA              NA   NA NA                        Complete
3             NA    NA              NA   NA NA                        Complete
4             NA    NA              NA   NA NA                        Complete
5             NA    NA              NA   NA NA                        Complete
6             NA    NA              NA   NA NA                        Complete
7             NA    NA              NA   NA NA                        Complete
8             NA    NA              NA   NA NA                        Complete
9             NA    NA              NA   NA NA                        Complete
10            NA    NA              NA   NA NA                        Complete
11            NA    NA              NA   NA NA                        Complete
12            NA    NA              NA   NA NA                        Complete
13            NA    NA              NA   NA NA                        Complete
14            NA    NA              NA   NA NA                        Complete
15            NA    NA              NA   NA NA                        Complete
16            NA    NA              NA   NA NA                        Complete
17            NA    NA              NA   NA NA                        Complete
18            NA    NA              NA   NA NA                        Complete
19            NA    NA              NA   NA NA                        Complete
20            NA    NA              NA   NA NA                        Complete
21            NA    NA              NA   NA NA                        Complete
22            NA    NA              NA   NA NA                        Complete
23            NA    NA              NA   NA NA                        Complete
24            NA    NA              NA   NA NA                        Complete
25            NA    NA              NA   NA NA                        Complete
26            NA    NA              NA   NA NA                        Complete
27          1513  1281       0.8466623 2.22  4                        Complete
28            NA    NA              NA   NA NA                        Complete
29            NA    NA              NA   NA NA                        Complete
30            NA    NA              NA   NA NA                        Complete
31            NA    NA              NA   NA NA                        Complete
32            NA    NA              NA   NA NA                        Complete
   gp_postseason goals_postseason assists_postseason points_postseason
1              1                0                  0                 0
2              0               NA                 NA                NA
3              0               NA                 NA                NA
4             23                6                 13                19
5             21                4                  6                10
6             23                0                  1                 1
7              0               NA                 NA                NA
8             16                0                  4                 4
9             23               11                  5                16
10            23                3                  4                 7
11            11                4                 10                14
12             0               NA                 NA                NA
13            23                7                 16                23
14            23                2                  4                 6
15            22                1                  2                 3
16             0               NA                 NA                NA
17            23                2                  2                 4
18             0               NA                 NA                NA
19             3                0                  0                 0
20            23                4                  6                10
21             4                0                  0                 0
22            23                2                  3                 5
23             0               NA                 NA                NA
24             0               NA                 NA                NA
25            18                0                  4                 4
26            22                2                  3                 5
27            23                0                  1                 1
28            21               13                 13                26
29             0               NA                 NA                NA
30            23                1                  4                 5
31            23                6                 15                21
32            23                1                  2                 3
   plusmn_postseason pimi_postseason goals_ev_postseason goals_pp_postseason
1                  0               0                   0                   0
2                 NA              NA                  NA                  NA
3                 NA              NA                  NA                  NA
4                  6              16                   3                   3
5                  9              12                   1                   3
6                  5              20                   0                   0
7                 NA              NA                  NA                  NA
8                  3              14                   0                   0
9                  5               4                   9                   2
10                 5              47                   2                   1
11                 5               6                   3                   1
12                NA              NA                  NA                  NA
13                 8               6                   3                   4
14                 4              21                   2                   0
15                 7              16                   1                   0
16                NA              NA                  NA                  NA
17                 0              14                   2                   0
18                NA              NA                  NA                  NA
19                 0               0                   0                   0
20                -1              20                   1                   3
21                 0               2                   0                   0
22                 3              14                   2                   0
23                NA              NA                  NA                  NA
24                NA              NA                  NA                  NA
25                 2               6                   0                   0
26                 0               2                   2                   0
27                 0               0                   0                   0
28                 6               6                   8                   5
29                NA              NA                  NA                  NA
30                 1               8                   1                   0
31                13               8                   5                   1
32                 2               8                   1                   0
   goals_sh_postseason goals_gw_postseason assists_ev_postseason
1                    0                   0                    NA
2                   NA                  NA                    NA
3                   NA                  NA                    NA
4                    0                   0                    NA
5                    0                   1                    NA
6                    0                   0                    NA
7                   NA                  NA                    NA
8                    0                   0                    NA
9                    0                   2                    NA
10                   0                   1                    NA
11                   0                   2                    NA
12                  NA                  NA                    NA
13                   0                   1                    NA
14                   0                   0                    NA
15                   0                   1                    NA
16                  NA                  NA                    NA
17                   0                   0                    NA
18                  NA                  NA                    NA
19                   0                   0                    NA
20                   0                   1                    NA
21                   0                   0                    NA
22                   0                   1                    NA
23                  NA                  NA                    NA
24                  NA                  NA                    NA
25                   0                   0                    NA
26                   0                   0                    NA
27                   0                   0                    NA
28                   0                   3                    NA
29                  NA                  NA                    NA
30                   0                   0                    NA
31                   0                   2                    NA
32                   0                   1                    NA
   assists_pp_postseason assists_sh_postseason shots_postseason
1                     NA                    NA                0
2                     NA                    NA               NA
3                     NA                    NA               NA
4                     NA                    NA               83
5                     NA                    NA               49
6                     NA                    NA               20
7                     NA                    NA               NA
8                     NA                    NA                8
9                     NA                    NA               62
10                    NA                    NA               28
11                    NA                    NA               23
12                    NA                    NA               NA
13                    NA                    NA               51
14                    NA                    NA               16
15                    NA                    NA               14
16                    NA                    NA               NA
17                    NA                    NA               20
18                    NA                    NA               NA
19                    NA                    NA                0
20                    NA                    NA               39
21                    NA                    NA                0
22                    NA                    NA               16
23                    NA                    NA               NA
24                    NA                    NA               NA
25                    NA                    NA                8
26                    NA                    NA               14
27                    NA                    NA                0
28                    NA                    NA               79
29                    NA                    NA               NA
30                    NA                    NA               14
31                    NA                    NA               37
32                    NA                    NA               23
   shooting_percentage_postseason toi_postseason atoi_postseason
1                              NA              1             32S
2                              NA             NA            <NA>
3                              NA             NA            <NA>
4                        7.228916            677         29M 26S
5                        8.163265            599         28M 32S
6                        0.000000            328         14M 17S
7                              NA             NA            <NA>
8                        0.000000            101          6M 18S
9                       17.741935            439          19M 6S
10                      10.714286            652         28M 22S
11                      17.391304            241         21M 55S
12                             NA             NA            <NA>
13                      13.725490            496         21M 33S
14                      12.500000            192          8M 22S
15                       7.142857            357         16M 15S
16                             NA             NA            <NA>
17                      10.000000            374         16M 16S
18                             NA             NA            <NA>
19                             NA             10          3M 15S
20                      10.256410            326         14M 10S
21                             NA              9          2M 12S
22                      12.500000            345         14M 59S
23                             NA             NA            <NA>
24                             NA             NA            <NA>
25                       0.000000            164           9M 8S
26                      14.285714            267          12M 9S
27                             NA           1451            <NA>
28                      16.455696            452         21M 33S
29                             NA             NA            <NA>
30                       7.142857            276         11M 59S
31                      16.216216            444         19M 18S
32                       4.347826            319         13M 52S
   post_season_scoring_complete wins_postseason losses_postseason
1                      Complete               0                 0
2                      Complete              NA                NA
3                      Complete              NA                NA
4                      Complete              NA                NA
5                      Complete              NA                NA
6                      Complete              NA                NA
7                      Complete              NA                NA
8                      Complete              NA                NA
9                      Complete              NA                NA
10                     Complete              NA                NA
11                     Complete              NA                NA
12                     Complete              NA                NA
13                     Complete              NA                NA
14                     Complete              NA                NA
15                     Complete              NA                NA
16                     Complete              NA                NA
17                     Complete              NA                NA
18                     Complete              NA                NA
19                     Complete              NA                NA
20                     Complete              NA                NA
21                     Complete              NA                NA
22                     Complete              NA                NA
23                     Complete              NA                NA
24                     Complete              NA                NA
25                     Complete              NA                NA
26                     Complete              NA                NA
27                   Incomplete              16                 7
28                     Complete              NA                NA
29                     Complete              NA                NA
30                     Complete              NA                NA
31                     Complete              NA                NA
32                     Complete              NA                NA
   ties_otl_postseason goals_allowed_postseason saves_postseason
1                   NA                        0                0
2                   NA                       NA               NA
3                   NA                       NA               NA
4                   NA                       NA               NA
5                   NA                       NA               NA
6                   NA                       NA               NA
7                   NA                       NA               NA
8                   NA                       NA               NA
9                   NA                       NA               NA
10                  NA                       NA               NA
11                  NA                       NA               NA
12                  NA                       NA               NA
13                  NA                       NA               NA
14                  NA                       NA               NA
15                  NA                       NA               NA
16                  NA                       NA               NA
17                  NA                       NA               NA
18                  NA                       NA               NA
19                  NA                       NA               NA
20                  NA                       NA               NA
21                  NA                       NA               NA
22                  NA                       NA               NA
23                  NA                       NA               NA
24                  NA                       NA               NA
25                  NA                       NA               NA
26                  NA                       NA               NA
27                  NA                       41              622
28                  NA                       NA               NA
29                  NA                       NA               NA
30                  NA                       NA               NA
31                  NA                       NA               NA
32                  NA                       NA               NA
   save_percentage_postseason gaa_postseason so_postseason
1                       0.000            0.0             0
2                          NA             NA            NA
3                          NA             NA            NA
4                          NA             NA            NA
5                          NA             NA            NA
6                          NA             NA            NA
7                          NA             NA            NA
8                          NA             NA            NA
9                          NA             NA            NA
10                         NA             NA            NA
11                         NA             NA            NA
12                         NA             NA            NA
13                         NA             NA            NA
14                         NA             NA            NA
15                         NA             NA            NA
16                         NA             NA            NA
17                         NA             NA            NA
18                         NA             NA            NA
19                         NA             NA            NA
20                         NA             NA            NA
21                         NA             NA            NA
22                         NA             NA            NA
23                         NA             NA            NA
24                         NA             NA            NA
25                         NA             NA            NA
26                         NA             NA            NA
27                      0.934            1.7             4
28                         NA             NA            NA
29                         NA             NA            NA
30                         NA             NA            NA
31                         NA             NA            NA
32                         NA             NA            NA
   post_season_goalies_2_complete
1                        Complete
2                        Complete
3                        Complete
4                        Complete
5                        Complete
6                        Complete
7                        Complete
8                        Complete
9                        Complete
10                       Complete
11                       Complete
12                       Complete
13                       Complete
14                       Complete
15                       Complete
16                       Complete
17                     Incomplete
18                       Complete
19                       Complete
20                       Complete
21                       Complete
22                       Complete
23                       Complete
24                       Complete
25                       Complete
26                       Complete
27                       Complete
28                       Complete
29                       Complete
30                       Complete
31                       Complete
32                       Complete
> 
> avs <- format_record(avs_raw_core, class = "data.frame")
> head(avs)
  record_id uniform_number firstname  lastname hof nationality position
1         1              1     David Aebischer   0       Swiss     Goal
2         2             46      Yuri   Babenko   0        USSR   Center
3         3             45      Rick     Berry   0      Canada  Defence
4         4              4       Rob     Blake   1      Canada  Defence
5         5             77       Ray   Bourque   1      Canada  Defence
6         6              7      Greg  de Vries   0      Canada  Defence
   birthdate height weight shoots catches experience roster_complete gp goals
1 1978-02-07     73    185   <NA>    Left          0        Complete 26     0
2 1978-01-02     73    200   Left    <NA>          0        Complete  3     0
3 1978-11-04     74    210   Left    <NA>          0        Complete 19     0
4 1969-12-10     76    220  Right    <NA>         11        Complete 13     2
5 1960-12-28     71    219   Left    <NA>         21        Complete 80     7
6 1973-01-04     74    205   Left    <NA>          5        Complete 79     5
  assists points plusmn pimi goals_ev goals_pp goals_sh goals_gw assists_ev
1       1      1      0    0        0        0        0        0         NA
2       0      0      0    0        0        0        0        0          0
3       4      4      5   38        0        0        0        0          4
4       8     10     11    8        1        1        0        1          6
5      52     59     25   48        3        2        2        0         21
6      12     17     23   51        5        0        0        0         11
  assists_pp assists_sh shots shooting_percentage  toi    atoi
1         NA         NA     0            0.000000 1393 53M 34S
2          0          0     2            0.000000   32 10M 34S
3          0          0    10            0.000000  231  12M 8S
4          2          0    44            4.545455  339  26M 3S
5         31          0   216            3.240741 2088  26M 6S
6          0          1    76            6.578947 1351  17M 6S
  regular_season_scoring_complete wins losses ties_otl goals_against
1                        Complete   12      7        3            52
2                        Complete   NA     NA       NA            NA
3                        Complete   NA     NA       NA            NA
4                        Complete   NA     NA       NA            NA
5                        Complete   NA     NA       NA            NA
6                        Complete   NA     NA       NA            NA
  shots_against saves save_percentage  gaa so regular_season_goalies_complete
1           538   486       0.9033457 2.24  3                        Complete
2            NA    NA              NA   NA NA                        Complete
3            NA    NA              NA   NA NA                        Complete
4            NA    NA              NA   NA NA                        Complete
5            NA    NA              NA   NA NA                        Complete
6            NA    NA              NA   NA NA                        Complete
  gp_postseason goals_postseason assists_postseason points_postseason
1             1                0                  0                 0
2             0               NA                 NA                NA
3             0               NA                 NA                NA
4            23                6                 13                19
5            21                4                  6                10
6            23                0                  1                 1
  plusmn_postseason pimi_postseason goals_ev_postseason goals_pp_postseason
1                 0               0                   0                   0
2                NA              NA                  NA                  NA
3                NA              NA                  NA                  NA
4                 6              16                   3                   3
5                 9              12                   1                   3
6                 5              20                   0                   0
  goals_sh_postseason goals_gw_postseason assists_ev_postseason
1                   0                   0                    NA
2                  NA                  NA                    NA
3                  NA                  NA                    NA
4                   0                   0                    NA
5                   0                   1                    NA
6                   0                   0                    NA
  assists_pp_postseason assists_sh_postseason shots_postseason
1                    NA                    NA                0
2                    NA                    NA               NA
3                    NA                    NA               NA
4                    NA                    NA               83
5                    NA                    NA               49
6                    NA                    NA               20
  shooting_percentage_postseason toi_postseason atoi_postseason
1                             NA              1             32S
2                             NA             NA            <NA>
3                             NA             NA            <NA>
4                       7.228916            677         29M 26S
5                       8.163265            599         28M 32S
6                       0.000000            328         14M 17S
  post_season_scoring_complete wins_postseason losses_postseason
1                     Complete               0                 0
2                     Complete              NA                NA
3                     Complete              NA                NA
4                     Complete              NA                NA
5                     Complete              NA                NA
6                     Complete              NA                NA
  ties_otl_postseason goals_allowed_postseason saves_postseason
1                  NA                        0                0
2                  NA                       NA               NA
3                  NA                       NA               NA
4                  NA                       NA               NA
5                  NA                       NA               NA
6                  NA                       NA               NA
  save_percentage_postseason gaa_postseason so_postseason
1                          0              0             0
2                         NA             NA            NA
3                         NA             NA            NA
4                         NA             NA            NA
5                         NA             NA            NA
6                         NA             NA            NA
  post_season_goalies_2_complete
1                       Complete
2                       Complete
3                       Complete
4                       Complete
5                       Complete
6                       Complete
> 
> avs <- format_record(avs_raw_core, class = "data.table")
Warning in format_record.rcer_raw_record(x = x$record_raw, metadata = x$metadata_raw,  :
  At least one of the columns is an S4 class.
  data.table might not work correctly for
  atoi, atoi_postseason
  check status of https://github.com/Rdatatable/data.table/issues/4315
  and https://github.com/dewittpe/REDCapExporter/issues/17
> avs$atoi
 [1] "53M 34S" "10M 34S" "12M 8S"  "26M 3S"  "26M 6S"  "17M 6S"  "17M 38S"
 [8] "6M 26S"  "18M 3S"  "25M 22S" "20M 48S" "14M 59S" "19M 52S" "10M 21S"
[15] "19M 56S" "9M 17S"  "12M 16S" "18M 25S" "8M 14S"  "12M 26S" "5M 42S" 
[22] "14M 23S" "9M 50S"  "9M 47S"  "9M 53S"  "15M 38S" "57M 30S" "23M 1S" 
[29] "6M 45S"  "20M 41S" "17M 51S" "14M 28S"
> as.numeric(avs$atoi)
 [1] 3214  634  728 1563 1566 1026 1058  386 1083 1522 1248  899 1192  621 1196
[16]  557  736 1105  494  746  342  863  590  587  593  938 3450 1381  405 1241
[31] 1071  868
> avs[, `:=`(atoi_seconds = as.numeric(atoi),
+            atoi_seconds_postseason = as.numeric(atoi_postseason),
+            atoi = as.character(atoi),
+            atoi_postseason = as.character(atoi_postseason))]
> avs[, .SD, .SDcols = patterns("atoi")]
       atoi atoi_postseason atoi_seconds atoi_seconds_postseason
 1: 53M 34S             32S         3214                      32
 2: 10M 34S            <NA>          634                      NA
 3:  12M 8S            <NA>          728                      NA
 4:  26M 3S         29M 26S         1563                    1766
 5:  26M 6S         28M 32S         1566                    1712
 6:  17M 6S         14M 17S         1026                     857
 7: 17M 38S            <NA>         1058                      NA
 8:  6M 26S          6M 18S          386                     378
 9:  18M 3S          19M 6S         1083                    1146
10: 25M 22S         28M 22S         1522                    1702
11: 20M 48S         21M 55S         1248                    1315
12: 14M 59S            <NA>          899                      NA
13: 19M 52S         21M 33S         1192                    1293
14: 10M 21S          8M 22S          621                     502
15: 19M 56S         16M 15S         1196                     975
16:  9M 17S            <NA>          557                      NA
17: 12M 16S         16M 16S          736                     976
18: 18M 25S            <NA>         1105                      NA
19:  8M 14S          3M 15S          494                     195
20: 12M 26S         14M 10S          746                     850
21:  5M 42S          2M 12S          342                     132
22: 14M 23S         14M 59S          863                     899
23:  9M 50S            <NA>          590                      NA
24:  9M 47S            <NA>          587                      NA
25:  9M 53S           9M 8S          593                     548
26: 15M 38S          12M 9S          938                     729
27: 57M 30S            <NA>         3450                      NA
28:  23M 1S         21M 33S         1381                    1293
29:  6M 45S            <NA>          405                      NA
30: 20M 41S         11M 59S         1241                     719
31: 17M 51S         19M 18S         1071                    1158
32: 14M 28S         13M 52S          868                     832
       atoi atoi_postseason atoi_seconds atoi_seconds_postseason
> 
> 
> 
> 
> ### * <FOOTER>
> ###
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed:  5.72 0.58 6.35 NA NA 
> grDevices::dev.off()
null device 
          1 
> ###
> ### Local variables: ***
> ### mode: outline-minor ***
> ### outline-regexp: "\\(> \\)?### [*]+" ***
> ### End: ***
> quit('no')