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

Only use tibbles if tibble installed #25

Merged
merged 1 commit into from Jun 16, 2020
Merged

Only use tibbles if tibble installed #25

merged 1 commit into from Jun 16, 2020

Conversation

hadley
Copy link
Contributor

@hadley hadley commented Jun 16, 2020

This uses a couple of tricks (a delayed binding and an .R file in the data/ directory) to conditionally use tibbles if tibble is installed. I think this gives the best of both worlds — if you're teaching a tidyverse centric course, you'll get tibbles; if you're running in a low dependency environment, you'll get a data frame.

The penguins object will never behave differently in a given session; it will either be a pure data frame or a tibble after it is accessed for the first time. It will behave differently in another session if you later install tibble, but I think this should be a relatively rare scenario.

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

Successfully merging this pull request may close these issues.

None yet

2 participants