Questions tagged [reproducible-research]

Reproducible research is the idea that the result of scientific research should be published with data and code in order to make it possible for other researchers to verify the results.

Reproducible research is the idea that the result of scientific research should be published with data and code in order to make it possible for other researchers to verify the results.

Reproducible research may be especially important to you if your investigation involves large amount of data or very complex calculations.

One possible set of tools for reproducible research is using with or .

Related links:

227 questions
5
votes
1 answer

Bookdown figure caption fails if too long in landscape?

I have a plot which is large enough to require plotting landscape in what is otherwise a portrait document using (PDF) bookdown in RStudio. The figure has a lot going on, so the figure caption is quite long, and I cannot really reduce the text any…
tellis
  • 152
  • 6
5
votes
1 answer

Why would an R package load random numbers?

Recently, I was reading the documentation for the caret package when I noticed this: Also, please note that some packages load random numbers when loaded (directly or via namespace) and this may effect [sic] reproducibility. What are possible use…
Sean Raleigh
  • 579
  • 4
  • 10
5
votes
1 answer

How should Jupyter extensions be installed and enabled for being reproducible?

I'd like to make interactive slide set (for a presentation with some live coding in python) with RISE a.k.a. live_reveal, which is a notebook extension for Jupyter. I'd like the slide set to be usable by others (and by my future self) without too…
das-g
  • 9,718
  • 4
  • 38
  • 80
5
votes
0 answers

Python + numpy: same code, different numerical result

I've identified some really funny behavior that I am curious about. Ultimately, I want code that is totally reproducible for scientific computing reasons. Anyway, here's a snippet of code with output. And as you can see, the same computations lead…
5
votes
1 answer

knitr - Python engine cache option not working

yihui gives an example of using the cache option for the different engines https://github.com/yihui/knitr-examples/blob/master/023-engine-python.Rmd I can't seem to get it to work for python. The following…
Glen Thompson
  • 9,071
  • 4
  • 54
  • 50
5
votes
2 answers

How to import/expand noweb refs in evaluated (exported) source blocks in org-babel?

I'm trying to do something like this: * Define some functions #+begin_src python :noweb_ref defs def f1(a,b,c): return True def f2(d,e,f): return False #+end_src * Use them in a results-exported block later #+begin_src python…
5
votes
3 answers

Loops with captions with knitr

I am wondering if there is an easy way to produce a bunch of tables or graphics with variable captions in knitr. The only way I know is this: (simplified from https://github.com/yihui/knitr-examples/blob/master/075-knit-expand.Rnw). But it is a drag…
Steve Powell
  • 1,646
  • 16
  • 26
4
votes
2 answers

Analog of r-here or py-here for Julia

BACKGROUND One of the very useful tools for reproducible work in R is the "here"…
EngrStudent
  • 1,924
  • 31
  • 46
4
votes
1 answer

How to create requirements.txt in Python with actually used libraries?

I find Colab pre-installed libraries convenient as well as AWS Sagemaker pre-defined kernels but this convenience becomes very annoying when gathering the requirements.txt file as I end up with many libraries I have not actually used in my project.…
G. Macia
  • 1,204
  • 3
  • 23
  • 38
4
votes
0 answers

Text wrapping in code sections using Tufte format

Text in the code section of a Tufte formatted, Rmarkdown document does not seem to wrap. I have tried several options and suggestions, but nothing works. I am guessing that all of the other suggestions I could find on StackOverflow did not work,…
Mark Bower
  • 569
  • 2
  • 16
4
votes
0 answers

How can I make numpy use SSE4_2 instead of AVX?

I am struggling with a python reproducibility problem across different machines. I have two machines: an older server with SSE4_2 and a newer desktop with AVX. Running the same python script on both machines results in different outputs (I made sure…
ej_01
  • 51
  • 4
4
votes
1 answer

TensorFlow - reproducing results when using dropout

I am training a neural network using dropout regularization. I save the weights and biases the network is initialized with, so that I can repeat the experiment when I get good results. However, the use of dropout introduces some randomness in the…
4
votes
1 answer

extract R code from template using knit_expand()

I have produced a dynamic document using knitr. The document makes extensive use of the package's knit_expand() function for templates. This is illustrated by the MWE (based on Yihui Xie's own example for the function). Main document…
4
votes
0 answers

What is the best way to manage sensitive data in a package?

I work with medical data, and prefer to develop analyses in a package environment, taking advantage of R CMD check, testthat and devtools. A typical analysis will begin by extracting data from a database (often with lengthy joins and many rows, so…
Jack Wasey
  • 3,360
  • 24
  • 43
4
votes
1 answer

A Way in Knitr to Copy a Chunk?

Knitr Mavens, Background: Using knitr to report a report with many embedded graphs. In the body of the report, all that's appropriate is the graph, not the code. For example: ```{r graph_XYZ_subset, echo = FALSE, message = TRUE, …
Plane Wryter
  • 1,299
  • 1
  • 11
  • 14
1 2
3
15 16