Re: [R] r-markdown - keeping figures
Yes, setting the fig.path option will prevent rmarkdown from deleting the figure files, and the more natural way to preserve these intermediate files is to set the rmarkdown option keep_tex or keep_md (depending on your output format) to yes, e.g. --- output: pdf_document: keep_tex: yes html_document: keep_md: yes --- Regards, Yihui -- Yihui Xie Web: http://yihui.name On Wed, Oct 21, 2015 at 7:21 AM, Jeff Newmiller wrote: > I think the default now is to not save them unless you set the fig.path chunk > option. > > http://kbroman.org/knitr_knutshell/pages/Rmarkdown.html > --- > Jeff NewmillerThe . . Go Live... > DCN:Basics: ##.#. ##.#. Live Go... > Live: OO#.. Dead: OO#.. Playing > Research Engineer (Solar/BatteriesO.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On October 21, 2015 1:47:33 PM GMT+02:00, Bob O'Hara > wrote: >>The figures should be saved somewhere. e.g. if you have x.Rmd, you >>should have a X_files/ folder with subfolders for the figures (e.g. >>X-html or X-latex). At least that's what I have. >> >>Bob >> >>On 20 October 2015 at 18:18, Witold E Wolski >>wrote: >>> I am running r-markdown from r-studio and can't work out how to keep >>> the figures. >>> I mean I have a few figures in the document and would like to have >>> them as separate pdf's too as I have been used to have them when >>using >>> Sweave. >>> >>> >>> >>> best regards >>> Witold >>> >>> >>> -- >>> Witold Eryk Wolski >>> >>> __ >>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide >>http://www.R-project.org/posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] r-markdown - keeping figures
I think the default now is to not save them unless you set the fig.path chunk option. http://kbroman.org/knitr_knutshell/pages/Rmarkdown.html --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. On October 21, 2015 1:47:33 PM GMT+02:00, Bob O'Hara wrote: >The figures should be saved somewhere. e.g. if you have x.Rmd, you >should have a X_files/ folder with subfolders for the figures (e.g. >X-html or X-latex). At least that's what I have. > >Bob > >On 20 October 2015 at 18:18, Witold E Wolski >wrote: >> I am running r-markdown from r-studio and can't work out how to keep >> the figures. >> I mean I have a few figures in the document and would like to have >> them as separate pdf's too as I have been used to have them when >using >> Sweave. >> >> >> >> best regards >> Witold >> >> >> -- >> Witold Eryk Wolski >> >> __ >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] r-markdown - keeping figures
The figures should be saved somewhere. e.g. if you have x.Rmd, you should have a X_files/ folder with subfolders for the figures (e.g. X-html or X-latex). At least that's what I have. Bob On 20 October 2015 at 18:18, Witold E Wolski wrote: > I am running r-markdown from r-studio and can't work out how to keep > the figures. > I mean I have a few figures in the document and would like to have > them as separate pdf's too as I have been used to have them when using > Sweave. > > > > best regards > Witold > > > -- > Witold Eryk Wolski > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Bob O'Hara Biodiversity and Climate Research Centre Senckenberganlage 25 D-60325 Frankfurt am Main, Germany Tel: +49 69 798 40226 Mobile: +49 1515 888 5440 WWW: http://www.bik-f.de/root/index.php?page_id=219 Blog: http://occamstypewriter.org/boboh/ Journal of Negative Results - EEB: www.jnr-eeb.org __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] r-markdown - keeping figures
It may not be elegant but you can just embed a png() command in the knitr code. Code from RStudio example with png() command added. ```{r, echo=FALSE} plot(cars) png("~/Rjunk/pnd.png") plot(cars) dev.off() ``` John Kane Kingston ON Canada > -Original Message- > From: wewol...@gmail.com > Sent: Tue, 20 Oct 2015 18:18:04 +0200 > To: r-help@r-project.org > Subject: [R] r-markdown - keeping figures > > I am running r-markdown from r-studio and can't work out how to keep > the figures. > I mean I have a few figures in the document and would like to have > them as separate pdf's too as I have been used to have them when using > Sweave. > > > > best regards > Witold > > > -- > Witold Eryk Wolski > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] r-markdown - keeping figures
I am running r-markdown from r-studio and can't work out how to keep the figures. I mean I have a few figures in the document and would like to have them as separate pdf's too as I have been used to have them when using Sweave. best regards Witold -- Witold Eryk Wolski __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.