Skip to contents

Coerce REDCapExporter objects to data.frame.

Usage

# S3 method for class 'rcer_raw_metadata'
as.data.frame(x, ...)

# S3 method for class 'rcer_raw_record'
as.data.frame(x, ...)

# S3 method for class 'rcer_raw_project'
as.data.frame(x, ...)

# S3 method for class 'rcer_raw_user'
as.data.frame(x, ...)

Arguments

x

any R object.

...

additional arguments to be passed to or from methods.

Details

These functions are S3 methods for as.data.frame for the raw exports from the REDCap API.

Examples


data("avs_raw_record")

avs_record <- as.data.frame(avs_raw_record)

str(avs_record)
#> Classes ‘rcer_record’ and 'data.frame':	32 obs. of  75 variables:
#>  $ record_id                      : chr  "1" "2" "3" "4" ...
#>  $ uniform_number                 : chr  "1" "46" "45" "4" ...
#>  $ firstname                      : chr  "David" "Yuri" "Rick" "Rob" ...
#>  $ lastname                       : chr  "Aebischer" "Babenko" "Berry" "Blake" ...
#>  $ hof                            : chr  "0" "0" "0" "1" ...
#>  $ nationality                    : chr  "Swiss" "USSR" "Canada" "Canada" ...
#>  $ position                       : chr  "0" "3" "4" "4" ...
#>  $ birthdate                      : chr  "1978-02-07" "1978-01-02" "1978-11-04" "1969-12-10" ...
#>  $ first_nhl_game                 : chr  "2001-04-07" "2000-11-22" "2001-01-07" "1990-03-27" ...
#>  $ last_nhl_game                  : chr  "2007-10-10" "2000-11-29" "2004-04-04" "2010-05-23" ...
#>  $ height                         : chr  "73" "73" "74" "76" ...
#>  $ weight                         : chr  "185" "200" "210" "220" ...
#>  $ shoots                         : chr  "" "0" "0" "1" ...
#>  $ catches                        : chr  "0" "" "" "" ...
#>  $ experience                     : chr  "0" "0" "0" "11" ...
#>  $ roster_complete                : chr  "2" "2" "2" "2" ...
#>  $ gp                             : chr  "26" "3" "19" "13" ...
#>  $ goals                          : chr  "0" "0" "0" "2" ...
#>  $ assists                        : chr  "1" "0" "4" "8" ...
#>  $ points                         : chr  "1" "0" "4" "10" ...
#>  $ plusmn                         : chr  "0" "0" "5" "11" ...
#>  $ pimi                           : chr  "0" "0" "38" "8" ...
#>  $ goals_ev                       : chr  "0" "0" "0" "1" ...
#>  $ goals_pp                       : chr  "0" "0" "0" "1" ...
#>  $ goals_sh                       : chr  "0" "0" "0" "0" ...
#>  $ goals_gw                       : chr  "0" "0" "0" "1" ...
#>  $ assists_ev                     : chr  "" "0" "4" "6" ...
#>  $ assists_pp                     : chr  "" "0" "0" "2" ...
#>  $ assists_sh                     : chr  "" "0" "0" "0" ...
#>  $ shots                          : chr  "0" "2" "10" "44" ...
#>  $ shooting_percentage            : chr  "0" "0" "0" "4.545454545454546" ...
#>  $ toi                            : chr  "1393" "32" "231" "339" ...
#>  $ atoi                           : chr  "53:34" "10:34" "12:08" "26:03" ...
#>  $ regular_season_scoring_complete: chr  "2" "2" "2" "2" ...
#>  $ wins                           : chr  "12" "" "" "" ...
#>  $ losses                         : chr  "7" "" "" "" ...
#>  $ ties_otl                       : chr  "3" "" "" "" ...
#>  $ goals_against                  : chr  "52" "" "" "" ...
#>  $ shots_against                  : chr  "538" "" "" "" ...
#>  $ saves                          : chr  "486" "" "" "" ...
#>  $ save_percentage                : chr  "0.9033457249070632" "" "" "" ...
#>  $ gaa                            : chr  "2.24" "" "" "" ...
#>  $ so                             : chr  "3" "" "" "" ...
#>  $ regular_season_goalies_complete: chr  "2" "2" "2" "2" ...
#>  $ gp_postseason                  : chr  "1" "0" "0" "23" ...
#>  $ goals_postseason               : chr  "0" "" "" "6" ...
#>  $ assists_postseason             : chr  "0" "" "" "13" ...
#>  $ points_postseason              : chr  "0" "" "" "19" ...
#>  $ plusmn_postseason              : chr  "0" "" "" "6" ...
#>  $ pimi_postseason                : chr  "0" "" "" "16" ...
#>  $ goals_ev_postseason            : chr  "0" "" "" "3" ...
#>  $ goals_pp_postseason            : chr  "0" "" "" "3" ...
#>  $ goals_sh_postseason            : chr  "0" "" "" "0" ...
#>  $ goals_gw_postseason            : chr  "0" "" "" "0" ...
#>  $ assists_ev_postseason          : chr  "" "" "" "" ...
#>  $ assists_pp_postseason          : chr  "" "" "" "" ...
#>  $ assists_sh_postseason          : chr  "" "" "" "" ...
#>  $ shots_postseason               : chr  "0" "" "" "83" ...
#>  $ shooting_percentage_postseason : chr  "" "" "" "7.228915662650602" ...
#>  $ toi_postseason                 : chr  "1" "" "" "677" ...
#>  $ atoi_postseason                : chr  "00:32" "" "" "29:26" ...
#>  $ post_season_scoring_complete   : chr  "2" "2" "2" "2" ...
#>  $ wins_postseason                : chr  "0" "" "" "" ...
#>  $ losses_postseason              : chr  "0" "" "" "" ...
#>  $ ties_otl_postseason            : chr  "" "" "" "" ...
#>  $ goals_allowed_postseason       : chr  "0" "" "" "" ...
#>  $ saves_postseason               : chr  "0" "" "" "" ...
#>  $ save_percentage_postseason     : chr  "0" "" "" "" ...
#>  $ gaa_postseason                 : chr  "0" "" "" "" ...
#>  $ so_postseason                  : chr  "0" "" "" "" ...
#>  $ post_season_goalies_complete   : chr  "2" "2" "2" "2" ...
#>  $ eg_checkbox___cb01             : chr  "1" "0" "0" "0" ...
#>  $ eg_checkbox___cb02             : chr  "0" "1" "0" "0" ...
#>  $ eg_checkbox___cb03             : chr  "0" "0" "0" "0" ...
#>  $ extras_complete                : chr  "0" "0" "0" "0" ...