Skip to content

Scrape Game Wrong Dataframe Return #21

@z-feldman

Description

@z-feldman
pbp_return <- tryCatch(
    calculate_xg(pbp_full),
    warning = function(cond){
      message(paste0("There was a problem calulating xG for game id ",game_id,"\n\n",cond))
      return(NULL)
    },
    error = function(cond){
      message(paste0("There was a problem calulating xG for game id ",game_id,"\n\n",cond))
      return(NULL)
    }
  )

  if(is.null(pbp_return)){
    pbp_return <- pbp_full
  }

  return(pbp_full)

I think the return(pbp_full) is meant to be return(pbp_return) here if I'm following the code correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions