fully-reproducible | fully reproducible
kandi X-RAY | fully-reproducible Summary
kandi X-RAY | fully-reproducible Summary
This is an example of a fully reproducible research paper using Github, Python, jinja2 and travis. On each git push, travis checks out this repository and executes the run.py script. The variables defined in that script are then made available to the jinja2 template paper.tex (which contains the LaTeX code for a research paper, with template fields for values that should be filled in from the script). Travis fills in the template and compiles paper.tex into a PDF file, which it then uploads to the gh-pages branch of this repository. (See for the rendered web page) This means that each stage of the analysis is represented as a git commit with a corresponding PDF file. Once all researchers agree on a commit that should represent the final version of their paper, they can use git tag to mark it as the official final version. When the paper is in review, corrections can in turn be marked with git tag. All of this makes it very easy for researchers to collaborate. For example, they can make use of Github's pull request feature to enable other researchers in their group to have a look at what has been changed and what the result in the paper is before they accept the change. This not only makes it more likely that mistakes are spotted early on, but also increases the effectiveness of the group ("Why don't you make use of X?").
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Format a table .
- Escape latex characters .
- Convert value to SI .
fully-reproducible Key Features
fully-reproducible Examples and Code Snippets
Community Discussions
Trending Discussions on fully-reproducible
QUESTION
When developing packages, I often have R scripts stored in the inst
directory that produce data objects then included in the package, i.e. stored as someObj.rda
in the data
directory.
These objects, in turn, have R scripts with roxygen2 headers for documentation (e.g. someObj.R). Ideally, I would like to include a line in the roxygen2 header that sources and formats the script as code, OUTSIDE of examples. Yes, I could copy the lines in, but in the DRY principle, it would be nice to have the documentation include the code automatically.
I have tried the following with no success:
...ANSWER
Answered 2020-May-08 at 01:38First, I would agree with Hong Ooi and say that in general you shouldn't put it in inst/
; that is copied into the user's installation. I follow the advice in Hadley Wickham's R Packages and put them in a folder called data-raw/
(which you then add to .Rbuildignore
). However, for the use case you further describe in the edits to your question, I can see why you would want to put the script in inst/
to distribute to your users.
But, on to the problem at hand. You can do this by instead using @evalRd
and adding the \details{}
part in rdScript()
. I set up a dummy package foo
with the file inst/bar.R
with the following code in it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fully-reproducible
You can use fully-reproducible like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page