-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
107 lines (63 loc) · 4.73 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
title: "sketchy: create custom research compendiums"
output: github_document
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
<!-- badges: start -->
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![Dependencies](https://tinyverse.netlify.com/badge/sketchy)](https://cran.r-project.org/package=sketchy) [![Project Status: Active The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Licence](https://img.shields.io/badge/https://img.shields.io/badge/licence-GPL--2-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![minimal R version](https://img.shields.io/badge/R%3E%3D-`r strsplit(gsub("depends: R \\(|\\)", "", grep("DEPENDS", ignore.case = TRUE, readLines(con = "./DESCRIPTION"), value = TRUE), ignore.case = TRUE), ",")[[1]][1]`-6666ff.svg)](https://cran.r-project.org/)[![packageversion](https://img.shields.io/badge/Package%20version-`r gsub("version: |version:", "", grep("^version", ignore.case = TRUE, readLines(con = "./DESCRIPTION"), value = TRUE), ignore.case = TRUE)`-orange.svg?style=flat-square)](commits/develop)[![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-yellowgreen.svg)](/commits/master) [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/sketchy)](https://cran.r-project.org/package=sketchy)
[![Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/sketchy)](https://cranlogs.r-pkg.org/badges/grand-total/sketchy)
<!-- badges: end -->
```{r setup, include = FALSE}
# knitr global options
knitr::opts_chunk$set(
collapse = TRUE,
out.width = "100%",
tidy = TRUE
)
library(sketchy)
```
<img src="man/figures/sketchy_sticker.png" alt="sketchy sticker" align="right" width = "25%" height="25%"/>
The package is intended to facilitate the use of research compendiums for data analysis in the R environment. Standard research compendiums provide a easily recognizable means for organizing digital materials, allowing other researchers to inspect, reproduce, and build upon that research.
Unlike other R packages for creating research compendiums (e.g. [vertical](https://github.com/CrumpLab/vertical), [rrtools](https://github.com/benmarwick/rrtools)), `sketchy` isn't wedded to a particular folder structure. Currently the package provides `r length(compendiums)` alternative structures (see object `compendiums`) and allows users to modify or input their own structures.
To install the latest developmental version from [github](https://github.com/) you will need the R package [remotes](https://cran.r-project.org/package=remotes):
```{r 1, eval = FALSE}
# From github
remotes::install_github("maRce10/sketchy")
#load package
library(sketchy)
```
## Default compendium skeletons
Compendiums can be set up with the function `make_compendium()`. The function creates the folder/subfolder structure and prints a diagram of the skeleton in the console:
### Basic compendium
```{r 3, eval = TRUE}
path = tempdir()
# load data
data(compendiums)
make_compendium(name = "proyect_x", path = path, format = "basic")
```
(*in these examples the compendiums are created in a temporary directory, change 'path' to create it in a different directory*)
### Alternative structures
We can use folder structures from other sources. For instance, in this example we use the structured suggested by Wilson *et al.* (2017):
```{r 4, eval = TRUE}
make_compendium(name = "proyect_z", path = path, format = "large_compendium")
```
When creating a compendium that includes a "manuscript" folder the package adds a "manuscript_template.Rmd" file for facilitating paper writing within the compendium itself.
We can check all compendium structure available as follows:
```{r 5, eval = TRUE}
for(i in 1:length(compendiums)){
print("---------------", quote = FALSE)
print(names(compendiums)[i], quote = FALSE)
print_skeleton(folders = compendiums[[i]]$skeleton)
}
```
---
Please cite [sketchy](https://marce10.github.io/sketchy/) as follows:
Araya-Salas, M., Willink, B., Arriaga, A. (2020), *sketchy: research compendiums for data analysis in R*. R package version 1.0.0.
# References
1. Alston, J., & Rick, J. (2020). *A Beginner’s Guide to Conducting Reproducible Research*.
1. Marwick, B., Boettiger, C., & Mullen, L. (2018). *Packaging Data Analytical Work Reproducibly Using R (and Friends)*. American Statistician, 72(1), 80–88.
1. Wilson G, Bryan J, Cranston K, Kitzes J, Nederbragt L. & Teal, T. K.. 2017. *Good enough practices in scientific computing*. PLOS Computational Biology 13(6): e1005510.