2DegreesInvesting / ds-incubator

2° Investing Initiative, ds-incubator website / eBook:
https://bit.ly/ds-incubator-videos
1 stars 4 forks source link

Creating reproducible examples #16

Open maurolepore opened 4 years ago

maurolepore commented 4 years ago

Relates to https://github.com/2DegreesInvesting/ds-incubator/issues/11#issuecomment-559573106

jennybc commented 4 years ago

I have a couple comments on 2019-12-10_reprex.pdf 😀

You can reprex in current working directory:

reprex::reprex(getwd(), outfile = NA)

yields

getwd()
#> [1] "/Users/jenny/rrr/googledrive"

(I happen to be working on googledrive right now). I hate the interface for this, so I do apologize for that (https://github.com/tidyverse/reprex/issues/295). That makes this feature fairly hard to discover / remember.

Also, the dev version of reprex has a new reprex_document() Rmd output format that is designed to be used with reprex_render():

I still think the main reason to do this instead of using reprex() is because it will allow the use knitr's non-R engines, i.e. to reprex Python or bash chunks.

maurolepore commented 4 years ago

I love the ds-incubator because by teaching I learn so much. Thanks @jennybc!

image