Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-22 Thread Luca Cerone
Hi Jeff, so far I have used the knitr purl() function, which extracts all the code chunks in a single R script. To achieve exactly what I need, the documentation at rmarkdown.rstudio.com seems to imply that playing with formats would allow me to get the report out of an existing script, but I still

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-21 Thread Jeff Newmiller
As much as I admire RStudio for making these documentation formats easy to use, they did not invent any of them. The closest they came to that was hiring Yihui. Having occupied our time with your questions, it would be polite if you closed the topic by explaining which approach you settled on an

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-21 Thread Luca Cerone
Dear all thank you very much for all the advices and help :) I think that Rstudio formats do what I need! 2014-06-21 3:31 GMT+02:00 David Winsemius : > > On Jun 20, 2014, at 2:40 AM, Luca Cerone wrote: > >> Hi Berend, sorry if it OT (though I think that the process is pretty >> much Rstudio inde

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-20 Thread David Winsemius
On Jun 20, 2014, at 2:40 AM, Luca Cerone wrote: > Hi Berend, sorry if it OT (though I think that the process is pretty > much Rstudio independent, since what Rstudio does is wrap up knitr and > their package Rmarkdown, > but all the process can be run from the shell). > > Bob, so far this is wha

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-20 Thread Henrik Bengtsson
On Fri, Jun 20, 2014 at 2:40 AM, Luca Cerone wrote: > Hi Berend, sorry if it OT (though I think that the process is pretty > much Rstudio independent, since what Rstudio does is wrap up knitr and > their package Rmarkdown, > but all the process can be run from the shell). > > Bob, so far this is w

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-20 Thread Luca Cerone
Hi Berend, sorry if it OT (though I think that the process is pretty much Rstudio independent, since what Rstudio does is wrap up knitr and their package Rmarkdown, but all the process can be run from the shell). Bob, so far this is what I do, but it is not ideal for two reasons: 1. I would like m

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-20 Thread Bob O'Hara
How about simply using source() to call the script? If necessary, wrap bits of the script in functions, so you source a file with lots of functions, and then call the ones you need, as you need them. Bob On 20 June 2014 11:20, Luca Cerone wrote: > Dear all, > I am very happy with the new featur

Re: [R] Rstudio: is it possible to create a document out of a working script?

2014-06-20 Thread Berend Hasselman
On 20-06-2014, at 11:20, Luca Cerone wrote: > Dear all, > I am very happy with the new features introduced by Rstudio about how > to create documents embedding R code. > > I would like to know though if there is some way to embed code from a > working script into an Rmd document. > I have sever

[R] Rstudio: is it possible to create a document out of a working script?

2014-06-20 Thread Luca Cerone
Dear all, I am very happy with the new features introduced by Rstudio about how to create documents embedding R code. I would like to know though if there is some way to embed code from a working script into an Rmd document. I have several working scripts for which I would like to report the resul