All Projects → Pakillo → Template

Pakillo / Template

A template for data analysis projects structured as R packages

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Template

Auto.js
A UiAutomator on android, does not need root access(安卓平台上的JavaScript自动化工具)
Stars: ✭ 10,882 (+9122.03%)
Mutual labels:  workflow
Drupal8ci
One-line installers for implementing Continuous Integration in Drupal 8
Stars: ✭ 113 (-4.24%)
Mutual labels:  workflow
Shortcuts Swift
Write Shortcuts in Playgrounds
Stars: ✭ 116 (-1.69%)
Mutual labels:  workflow
Action Download Artifact
⚙️ A GitHub Action to download an artifact associated with given workflow and commit or other criteria
Stars: ✭ 107 (-9.32%)
Mutual labels:  workflow
Workflow
审批王,华炎魔方内置BPM工作流引擎,低代码快速开发平台。
Stars: ✭ 111 (-5.93%)
Mutual labels:  workflow
Node Webcrypto Ossl
A WebCrypto Polyfill for Node in TypeScript built on OpenSSL.
Stars: ✭ 113 (-4.24%)
Mutual labels:  workflow
Petrinet
🚥 Petrinet framework for PHP
Stars: ✭ 107 (-9.32%)
Mutual labels:  workflow
Yii2 App Advanced
Yii 2.0 Advanced Application Template
Stars: ✭ 1,569 (+1229.66%)
Mutual labels:  project-template
Liteflow
liteflow是一个基于任务版本来实现的分布式任务流调度系统
Stars: ✭ 112 (-5.08%)
Mutual labels:  workflow
Armor
Light-weight Snakemake workflow for preprocessing and statistical analysis of RNA-seq data
Stars: ✭ 114 (-3.39%)
Mutual labels:  workflow
Qmuidemo web
QMUI Web 的示例项目及文档
Stars: ✭ 108 (-8.47%)
Mutual labels:  workflow
Pegasus
Pegasus Workflow Management System - Automate, recover, and debug scientific computations.
Stars: ✭ 110 (-6.78%)
Mutual labels:  workflow
Gitreflow
Reflow automatically creates pull requests, ensures the code review is approved, and squash merges finished branches to master with a great commit message template.
Stars: ✭ 1,488 (+1161.02%)
Mutual labels:  workflow
Gin Web
由gin + gorm + jwt + casbin组合实现的RBAC权限管理脚手架Golang版, 搭建完成即可快速、高效投入业务开发
Stars: ✭ 107 (-9.32%)
Mutual labels:  workflow
Themeforest Wordpress Theme Development Workflow
Themeforest WordPress theme development workflow
Stars: ✭ 116 (-1.69%)
Mutual labels:  workflow
Github Pages Deploy Action
Automatically deploy your project to GitHub Pages using GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like.
Stars: ✭ 2,507 (+2024.58%)
Mutual labels:  workflow
Ugene
UGENE is free open-source cross-platform bioinformatics software
Stars: ✭ 112 (-5.08%)
Mutual labels:  workflow
Leomoon Lightstudio
Light Studio plugin for Blender
Stars: ✭ 117 (-0.85%)
Mutual labels:  workflow
Concord
Concord - workflow orchestration and continuous deployment management
Stars: ✭ 117 (-0.85%)
Mutual labels:  workflow
Fuzzymail
📨 Email template generator. Making emails fun again.
Stars: ✭ 114 (-3.39%)
Mutual labels:  workflow

template package

Generic template for research or data analysis projects structured as R packages

Travis-CI Build Status HitCount since 2020-06-14

Rmarkdown documents are great to keep reproducible scientific workflows: tightly integrating code, results and text. Yet, once we are dealing with more complicated data analysis and writing custom code and functions for a project, structuring it as an R package can bring many advantages (e.g. see here and here, or read Marwick et al., but see also here for counterpoints).

Hence this package works as a template for new research or data analysis projects, with the idea of having everything (data, R scripts, functions, and manuscript reporting results) self-contained in the same package (a “research compendium”) to facilitate collaboration and promote reproducibility.

A short presentation introducing this approach on ‘Structuring data analysis projects as R packages’ is available here: https://doi.org/10.6084/m9.figshare.12479984.v1

Installation

# install.packages("remotes")
remotes::install_github("Pakillo/template")

Usage

First, load the package:

library("template")

Now run the function new_project to create a directory with all the scaffolding (slightly modified from R package structure). For example, to start a new project about tree growth, just use:

new_project("treegrowth")

If you want to create a GitHub repository for the project at the same time, use instead:

new_project("treegrowth", github = TRUE, private.repo = FALSE)

You could choose either public or private repository. Note that to create a GitHub repo you will need to have configured your system as explained in https://usethis.r-lib.org/articles/articles/usethis-setup.html.

There are other options you could choose, like setting up testthat or continuous integration (Travis-CI, GitHub actions…). See ?new_project for all options.

Developing the project

  1. Now edit README.Rmd and the DESCRIPTION file with some basic information about your project: title, brief description, licence, package dependencies, etc.

  2. Place original (raw) data in data-raw folder. Save all R scripts (or Rmarkdown documents) used for data preparation in the same folder.

  3. Save final (clean, tidy) datasets in the data folder. You may write documentation for these data.

  4. R scripts or Rmarkdown documents used for data analyses may be placed at the analyses folder. The final manuscript/report may be placed at the manuscript folder. You could use one of the many Rmarkdown templates available out there (e.g. rticles, rrtools or rmdTemplates).

  5. If you write custom functions, place them in the R folder. Document all your functions with Roxygen. Write tests for your functions and place them in the tests folder.

  6. If your analysis uses functions from other CRAN packages, include these as dependencies (Imports) in the DESCRIPTION file (e.g. using usethis::use_package() or rrtools::add_dependencies_to_description(). Also, use Roxygen @import or @importFrom in your function definitions, or alternatively package::function(), to import these dependencies in the namespace.

  7. I recommend using an advanced tool like drake or targets to manage your project workflow. A simpler alternative might be writing a makefile or master script to organise and execute all parts of the analysis. A template makefile is included with this package (use makefile = TRUE when calling new_project).

  8. Render Rmarkdown reports using rmarkdown::render, and use Rstudio Build menu to create/update documentation, run tests, build package, etc.

  9. Record the exact dependencies of your project. One option is simply running sessionInfo() but many more sophisticated alternatives exist. For example, automagic::make_deps_file() or renv::snapshot() will create a file recording the exact versions of all packages used, which can be used to recreate such environment in the future or in another computer. If you want to use Docker, you could use e.g. containerit::dockerfile() or rrtools::use_dockerfile().

  10. Archive your repository (e.g. in Zenodo), get a DOI, and include citation information in your README.

Thanks to:

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].