On Fri, Jul 3, 2015 at 9:29 PM, Rich Shepard <rshep...@appl-ecosys.com> wrote:
> On Fri, 3 Jul 2015, Liviu Andronic wrote:
>
>> If you have the results already ready, then what you generally want to do
>> is: load(".RData")
>
>
> Liviu,
>
>   For some reason this does not allow a function (saved in the current
> workspace) to be found and run in a knitr chunk in the lyx document. It does
> run in a R session in emacs (with ess running). I'll look into why in a bit.
>
It should. Try to inspect how the function is created, whether the
function object exists, if the workspace is loaded as expected, etc.


>   I decided that this document will be much more effective if it includes
> the R code for the analyses in addition to the results. This transparency
> makes it more technically sound and legally defensible and, should it become
> necessary, supports admissability as expert testimony in a trial.
>
Absolutely. This is what the R gods recommend for reproducibility:
http://cran.r-project.org/web/views/ReproducibleResearch.html

At the same time it can be a pain until you get the hang of it. Right
now I use a mix where I prepare the data and save it in the workspace,
load workspace, and run needed code from there. It's not reproducible
as purists will have it, but it's aeons better than copy/paste...

Liviu


> Thanks for all your help,
>
> Rich



-- 
Do you think you know what math is?
http://www.ideasroadshow.com/issues/ian-stewart-2013-08-02
Or what it means to be intelligent?
http://www.ideasroadshow.com/issues/john-duncan-2013-08-30
Think again:
http://www.ideasroadshow.com/library

Reply via email to