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

Missing csv files for faithfuld and luv_colours datasets #6105

Closed
2 of 10 tasks
tikkss opened this issue Sep 15, 2024 · 4 comments
Closed
2 of 10 tasks

Missing csv files for faithfuld and luv_colours datasets #6105

tikkss opened this issue Sep 15, 2024 · 4 comments

Comments

@tikkss
Copy link

tikkss commented Sep 15, 2024

Hi, I'm a contributor to red-data-tools/red-datasets: A RubyGem that provides common datasets.

red-datasets currently supports the following ggplot2 datasets. Thanks!

  • Available datasets
    • diamonds
    • mpg
  • Unavailable datasets
    • economics economics_long
    • faithfuld
    • midwest
    • msleep
    • presidential
    • seals
    • txhousing
    • luv_colours

By the way, faithfuld and luv_colours csv files seem to be missing. Is this intentional? If not, Could you add them? Thanks!

Steps to reproduce

Open https://github.com/tidyverse/ggplot2/tree/v3.5.1/data-raw

Expected result

faithfuld and luv_colours csv files exist.

Actual result

faithfuld and luv_colours csv files do not exist.

@yutannihilation
Copy link
Member

I'm afraid you are assuming these CSV files are the outputs generated by the corresponding R script. No, these are the source data that are loaded and tweaked. faithfuld and luv_colours don't have their CSV files because these two datasets are generated purely from R code.

https://github.com/tidyverse/ggplot2/blob/main/data-raw/faithfuld.R
https://github.com/tidyverse/ggplot2/blob/main/data-raw/luv_colours.R

@teunbrand
Copy link
Collaborator

From R and with ggplot2 installed, it is not too difficult to export these datasets to csv files.

write.csv(ggplot2::faithfuld, file = "faithfuld.csv", row.names = FALSE)
write.csv(ggplot2::luv_colours, file = "luv_colours.csv", row.names = FALSE)

@teunbrand
Copy link
Collaborator

I'm going to close this, because I see no need within the R ecosystem for ggplot2 to explicitly export these datasets as csv file, and it is straightforward to export them if so needed.

@tikkss
Copy link
Author

tikkss commented Sep 17, 2024

Sorry, for my late response. Thanks for the clarification! That makes sense, and it's nice to know that exporting the datasets using R as csv is easy if needed.

Thanks again!

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

3 participants