benmarwick / rrtools

rrtools: Tools for Writing Reproducible Research in R
Other
671 stars 85 forks source link

wrong figure location -- use_analysis #33

Closed dakni closed 7 years ago

dakni commented 7 years ago

Hi Ben!

when I use use_analysis() the analysis folder is created, including the sudirectory figures. When knitting the plot graphics are intended to be placed there. However, they get the name figures$CHUNKNAME.$FORMAT and are placed in the paper directory.

The manual workaround to achieve the intended behavior is to change the fig.path in the setup chunk of the Rmd to fig.path = "../figures/".

I searched through the rrtools functions in order to update the code/resolve this "bug" but I don't find the location where the setup chunk is created

benmarwick commented 7 years ago

Thanks, good spotting! That detail in controlled in a code chunk in the paper.Rmd template document in the inst/ directory. I made the change exactly as you suggested.