Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return a tibble instead of a data.frame #415

Closed
wibeasley opened this issue Aug 28, 2022 · 0 comments
Closed

Return a tibble instead of a data.frame #415

wibeasley opened this issue Aug 28, 2022 · 0 comments
Assignees

Comments

@wibeasley
Copy link
Member

For a while, REDCapR functions has been using readr::read_csv() for a while, but has continued to (upcast to) return data.frame. There's a small chance that someone's code (that pulls a single column from a REDCap project) would break because they depend on something like ds[, 3] returning a vector. That's the behavior of a data.frame. In contrast for tibbles, ds[, 3] returns a single-column rectangle/tibble/data.frame.

Until now, I've felt the tradeoff of (the small chance of breaking backward compatibility) favored returning a data.frame. I've changed my mind the past few weeks b/c calling readr::problems(ds) is informative if ds is a tibble, but not if ds is a data.frame.

I want those parsing problems to be as easy as possible for users to determine. Returning a tibble (instead of a data.frame)

@wibeasley wibeasley self-assigned this Aug 28, 2022
wibeasley added a commit that referenced this issue Aug 28, 2022
wibeasley added a commit that referenced this issue Aug 30, 2022
wibeasley added a commit that referenced this issue Aug 30, 2022
wibeasley added a commit that referenced this issue Aug 30, 2022
wibeasley added a commit that referenced this issue Aug 30, 2022
wibeasley added a commit that referenced this issue Aug 30, 2022
wibeasley added a commit that referenced this issue Aug 30, 2022
wibeasley added a commit that referenced this issue Aug 30, 2022
ref #415
wibeasley added a commit that referenced this issue Sep 6, 2022
wibeasley added a commit that referenced this issue Sep 6, 2022
a lot of tibble/data.frame changes too

ref #425, #415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant