beanumber / beanumber/openWAR

getData — Error in bind_rows_(x, .id) : Column `balls` can't be converted from character to integer

Open
#111 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
103
Forks
33
PR merge metrics
No merged PRs in 30d

Description

I received this error when retrieving data for the 2012 regular season. When I change the line of code in `getData(...)` from,

`out <- dplyr::bind_rows(ds.list)`

to

`out <- do.call(rbind, lapply(ds.list, data.frame, stringsAsFactors=FALSE))`

the code completes without an error, though `balls` and `strikes` are of type character so they need to be converted to integer: `out <- transform(out, balls = as.integer(balls), strikes = as.integer(strikes))`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.