mara
October 31, 2018, 3:28pm
4
Yep. reprexes have to be self-contained, so it's likely it doesn't know where test2.csv
is. That's not a bad thing, because no one else has that file either, so they wouldn't be able to reproduce your work anyhow!
See this thread for how to include your data in a reprex:
@EconomiCurtis split this out of FAQ: What's a reproducible example (`reprex`) and how do I do one? .
Curious if you have anything additional to add specifically on “how to prepare your own data for use in a reprex if you can’t, or don’t know how to reproduce a problem with a built-in dataset.”
I think @jessemaegan ’s post is about 80% there. The piece it is missing, if your average stack overflow post is any indication, is an explanation about how to prepare your own data for use in a reprex if you can’t, or don’t know how to reproduce a problem with a built-in dataset.
Some handy things to know for this situation:
deparse()
The ugly as sin, gold standard:
head(my_data, 2) %>%
depa…
I also recently wrote up a quick post with gifs on how to use datapasta with reprex here:
https://reprex.tidyverse.org/articles/articles/datapasta-reprex.html
3 Likes