Giter VIP home page Giter VIP logo

manuscriptpackage's Introduction

travis_badge

manuscriptPackage

This repository contains materials for using an R package to distribute a reproducible manuscript. Since it is structured as an R package all scripts can be saved as functions in /R, data stored in /data, and the manuscript stored as an R Markdown file in /vignettes.

The current template is a generic manuscript and could be used for draft versions of a manuscript or possible for pre-prints. In the future having additional .latex files for other journals (e.g. plos, JSS, etc.) that parse the YAML would be useful. Don't know if I will get around to that.

#Install the Package To install the package and gain access to the materials do the following:

install.packages("devtools")
library("devtools")
install_github("jhollist/manuscriptPackage",build_vignettes=TRUE)
library("manuscriptPackage")

If this were a real manuscript, the data used in this manuscript would be available via:

#This does not work as no data are included with this example
data(manuscript_data)

And the manuscript vignette can be read via:

vignette("manuscript",package="manuscriptPackage")

#How to use this? As this is a function-free package (if they were all this easy to build!), it has little use currently being installed into R (except if you want to view the rendered output with vignette()). It is useful, however, as a starting point for new manuscripts. The way I have used it is as follows:

  1. Fork it
  2. Rename it. You will need to rename the Github repo, rename the package in DESCRIPTION, rename manuscriptPackage-package.r and change the name in the manuscriptPackage-package.r documentation.
  3. Add some functions in /R.
  4. Add your data in /data.
  5. Edit /vignettes/manuscript.Rmd to include your manuscript. The manuscript.Rmd included here provides for an example of how to layout the document and includes all(?) allowed YAML. Tables and figures with captioning and references in a .bib file are also include.
  6. Commit, push, and share!

Or, use it as a .Rmd template

So huge thanks go to @Pakillo, who wrapped this template up, along with some others, to be used directly from the RStudio interface. His repo, rmdTemplates has the details on install. Once installed you can seled the template and knit direcly from RStudio. Thanks Francisco!

#Thanks The inspiration for housing a manuscript entierly within a package came from two sources. First, @rmflight has two blog posts about this concept. First post lays out the idea and the second post details the steps to do it. Second is @cboettig's template package.

Everything here is built upon their efforts. The latex template is a modified version of the default latex template that ships with pandoc/rstudio.

#Questions/Suggestions If you have any questions about this template, please use the issues in this repository. I will do my best to get back to you quickly.

If I have messed something up or if you have some thoughts on ehancements (i.e. different latex templates/YAML) please fork, make those changes and submit a pull request.

manuscriptpackage's People

Contributors

jhollist avatar benmarwick avatar

Watchers

James Cloos avatar Bing Zhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.