Skip to content

Commit

Permalink
CRAN release.
Browse files Browse the repository at this point in the history
  • Loading branch information
crsh committed Dec 23, 2020
1 parent 0b98703 commit fa449db
Show file tree
Hide file tree
Showing 12 changed files with 178 additions and 73 deletions.
12 changes: 8 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Package: prereg
Type: Package
Title: R Markdown Templates to Preregister Scientific Studies
Version: 0.4.0
Date: 2019-1-9
Authors@R: c(person("Frederik", "Aust", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-4900-788X")), person("Lisa", "Spitzer", email = "[email protected]", role = "aut"))
Version: 0.5.0
Authors@R: c(
person("Frederik", "Aust", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-4900-788X")),
person("Lisa", "Spitzer", email = "[email protected]", role = "aut")
)
Description: Provides a collection of templates to author preregistration documents for scientific studies in PDF format.
URL: https://github.com/crsh/prereg
BugReports: https://github.com/crsh/prereg/issues
Expand All @@ -14,5 +16,7 @@ Imports:
Suggests:
testthat
License: GPL-3
Encoding: UTF-8
LazyData: TRUE
RoxygenNote: 6.1.1
Language: en-US
RoxygenNote: 7.1.1
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
export(aspredicted_prereg)
export(brandt_prereg)
export(cos_prereg)
export(psyquant_prereg)
export(rr_prereg)
export(vantveer_prereg)
14 changes: 7 additions & 7 deletions R/prereg.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' R Markdown Templates to Preregister Scientific Studies
#'
#' The provided \href{http://rmarkdown.rstudio.com/}{R Markdown} templates are based
#' on the \href{https://cos.io/prereg/}{Center for Open Science Preregistration Challenge},
#' The provided \href{https://rmarkdown.rstudio.com/}{R Markdown} templates are based
#' on the \href{https://osf.io/x5w7h/}{Center for Open Science Preregistration Challenge},
#' the \href{https://aspredicted.org/}{AsPredicted.org} questions, a template suggested
#' for social psychology by van 't Veer and Giner-Sorolla (2016), and the replication recipe
#' suggested by Brandt et al. (2013).
Expand All @@ -11,11 +11,11 @@
#' software is installed on your computer:
#'
#' \itemize{
#' \item{\href{http://www.rstudio.com/}{RStudio} (>= 0.98.932); if you don't use RStudio
#' , you need to install \href{http://johnmacfarlane.net/pandoc/}{pandoc} using the
#' \href{https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md}{instructions for your operating system}}
#' \item{A \href{http://de.wikipedia.org/wiki/TeX}{TeX} distribution (2013 or later; e.g., \href{http://miktex.org/}{MikTeX}
#' for Windows, \href{https://tug.org/mactex/}{MacTeX} for Mac, obviously, or \href{http://www.tug.org/texlive/}{TeX Live}
#' \item{\href{https://rstudio.com/}{RStudio} (>= 0.98.932); if you don't use RStudio
#' , you need to install \href{https://pandoc.org/}{pandoc} using the
#' \href{https://pandoc.org/installing.html}{instructions for your operating system}}
#' \item{A \href{https://de.wikipedia.org/wiki/TeX}{TeX} distribution (2013 or later; e.g., \href{https://miktex.org/}{MikTeX}
#' for Windows, \href{https://tug.org/mactex/}{MacTeX} for Mac, obviously, or \href{https://www.tug.org/texlive/}{TeX Live}
#' for Linux)}
#' }
#'
Expand Down
22 changes: 8 additions & 14 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,19 @@ title: "prereg: R Markdown Templates for Preregistrations of Scientific Studies"
output: github_document
---

[![CRAN status](http://www.r-pkg.org/badges/version/prereg)](https://cran.r-project.org/package=prereg)
[![Download counter](http://cranlogs.r-pkg.org/badges/prereg)](https://cran.r-project.org/package=prereg)
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Build status](https://travis-ci.org/crsh/prereg.svg?branch=master)](https://travis-ci.org/crsh/prereg)
[![CRAN/METACRAN](https://img.shields.io/cran/v/prereg?label=CRAN&logo=r)](https://cran.r-project.org/package=prereg) [![Download counter](https://cranlogs.r-pkg.org/badges/prereg)](https://cran.r-project.org/package=prereg) [![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) ![GitHub last commit](https://img.shields.io/github/last-commit/crsh/prereg/master?label=Last commit&logo=github&logoColor=%23FFF) ![Travis build status](https://img.shields.io/travis/crsh/prereg?label=Build&logo=travis-ci&logoColor=%23FFF) [![GitHub bug issues](https://img.shields.io/github/issues/crsh/prereg/bug?label=Bugs&logo=github&logoColor=%23FFF)](https://github.com/crsh/prereg/issues?q=is%3Aopen+is%3Aissue+label%3Abug)

`prereg` provides [R Markdown](http://rmarkdown.rstudio.com/) templates that facilitates authoring preregistrations of scientific studies in PDF format.
The templates are based on the [Center for Open Science Preregistration Challenge](https://cos.io/prereg/), the [AsPredicted.org](http://aspredicted.org) questions, a template suggested for social psychology by van 't Veer and Giner-Sorolla (2016), and the replication recipe suggested by Brandt et al. (2013).
`prereg` provides [R Markdown](https://rmarkdown.rstudio.com/) templates that facilitates authoring preregistrations of scientific studies in PDF format.

If you experience any problems or have suggestions for improvements, please [open an issue](https://github.com/crsh/prereg/issues).

## Setup
### Requirements
To use R Markdown and `prereg` you need the following software on your computer:

- [R](http://www.r-project.org/) (2.11.1 or later)
- [RStudio](http://www.rstudio.com/) (0.99.441 or later) is optional; if you don't use RStudio, you need to install [pandoc](http://johnmacfarlane.net/pandoc/) using the [instructions for your operating system](https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md)
- A [TeX](http://de.wikipedia.org/wiki/TeX) distribution (2013 or later; e.g., [MikTeX](http://miktex.org/) for Windows, [MacTeX](https://tug.org/mactex/) for Mac, obviously, or [TeX Live](http://www.tug.org/texlive/) for Linux)
- [R](https://www.r-project.org/) (2.11.1 or later)
- [RStudio](https://rstudio.com/) (0.99.441 or later) is optional; if you don't use RStudio, you need to install [pandoc](https://pandoc.org/) using the [instructions for your operating system](https://pandoc.org/installing.html)
- A [TeX](https://de.wikipedia.org/wiki/TeX) distribution (2013 or later; e.g., [MikTeX](https://miktex.org/) for Windows, [MacTeX](https://tug.org/mactex/) for Mac, obviously, or [TeX Live](https://www.tug.org/texlive/) for Linux)
- If you are running **Windows**, use MikTex if possible. Currently, pandoc and the Windows version of Tex Live [don't seem to like each other](https://github.com/rstudio/rmarkdown/issues/6). Make sure you install the *complete*---not the basic---version.

### Install prereg
Expand Down Expand Up @@ -77,16 +73,14 @@ Possible repositories for this are:
- [Open Science Framework](https://osf.io/prereg/): An interdisciplinary platform provided by the Center for Open Science where preregistrations as well as other materials and data can be uploaded


## Acknowledgements
The templates for the preregistrations were developed by the [Center for Open Science](https://cos.io/prereg/), [AsPredicted.org](http://aspredicted.org), Anna Elisabeth van 't Veer and Roger Giner-Sorolla, and a task force composed of members of the American Psychological Association (APA), the British Psychological Society (BPS), the German Psychological Society (DGPs), the Center for Open Science (cos), and the Leibniz Institute for Psychology (ZPID).
## Acknowledgments
The templates for the preregistrations were developed by the [Center for Open Science](https://www.cos.io/initiatives/prereg), [AsPredicted.org](https://aspredicted.org/), Anna Elisabeth van 't Veer and Roger Giner-Sorolla, and a task force composed of members of the American Psychological Association (APA), the British Psychological Society (BPS), the German Psychological Society (DGPs), the Center for Open Science (cos), and the Leibniz Institute for Psychology (ZPID).
I'm thankful for their permission to use their material in this package.

## Package dependencies

```{r echo = FALSE, message = FALSE, fig.path = "tools/images/", warning = FALSE}
source("https://gist.githubusercontent.com/crsh/c906e93c260488e7363ea606243057c2/raw/817a8b1304ee6b1b6b149c3e948d8a59550313bd/plot_dependencies.R")
plot_dependencies()
depgraph::plot_dependency_graph()
```

# References
Expand Down
109 changes: 81 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
prereg: R Markdown Templates for Preregistrations of Scientific Studies
================

[![CRAN status](http://www.r-pkg.org/badges/version/prereg)](https://cran.r-project.org/package=prereg) [![Download counter](http://cranlogs.r-pkg.org/badges/prereg)](https://cran.r-project.org/package=prereg) [![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![Build status](https://travis-ci.org/crsh/prereg.svg?branch=master)](https://travis-ci.org/crsh/prereg)

`prereg` provides [R Markdown](http://rmarkdown.rstudio.com/) templates that facilitates authoring preregistrations of scientific studies in PDF format. The templates are based on the [Center for Open Science Preregistration Challenge](https://cos.io/prereg/), the [AsPredicted.org](http://aspredicted.org) questions, a template suggested for social psychology by van 't Veer and Giner-Sorolla (2016), and the replication recipe suggested by Brandt et al. (2013).

If you experience any problems or have suggestions for improvements, please [open an issue](https://github.com/crsh/prereg/issues).

Setup
-----
[![CRAN/METACRAN](https://img.shields.io/cran/v/prereg?label=CRAN&logo=r)](https://cran.r-project.org/package=prereg)
[![Download
counter](https://cranlogs.r-pkg.org/badges/prereg)](https://cran.r-project.org/package=prereg)
[![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)
![GitHub last
commit](https://img.shields.io/github/last-commit/crsh/prereg/master?label=Last%20commit&logo=github&logoColor=%23FFF)
![Travis build
status](https://img.shields.io/travis/crsh/prereg?label=Build&logo=travis-ci&logoColor=%23FFF)
[![GitHub bug
issues](https://img.shields.io/github/issues/crsh/prereg/bug?label=Bugs&logo=github&logoColor=%23FFF)](https://github.com/crsh/prereg/issues?q=is%3Aopen+is%3Aissue+label%3Abug)

`prereg` provides [R Markdown](https://rmarkdown.rstudio.com/) templates
that facilitates authoring preregistrations of scientific studies in PDF
format.

If you experience any problems or have suggestions for improvements,
please [open an issue](https://github.com/crsh/prereg/issues).

## Setup

### Requirements

To use R Markdown and `prereg` you need the following software on your computer:

- [R](http://www.r-project.org/) (2.11.1 or later)
- [RStudio](http://www.rstudio.com/) (0.99.441 or later) is optional; if you don't use RStudio, you need to install [pandoc](http://johnmacfarlane.net/pandoc/) using the [instructions for your operating system](https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md)
- A [TeX](http://de.wikipedia.org/wiki/TeX) distribution (2013 or later; e.g., [MikTeX](http://miktex.org/) for Windows, [MacTeX](https://tug.org/mactex/) for Mac, obviously, or [TeX Live](http://www.tug.org/texlive/) for Linux)
- If you are running **Windows**, use MikTex if possible. Currently, pandoc and the Windows version of Tex Live [don't seem to like each other](https://github.com/rstudio/rmarkdown/issues/6). Make sure you install the *complete*---not the basic---version.
To use R Markdown and `prereg` you need the following software on your
computer:

- [R](https://www.r-project.org/) (2.11.1 or later)
- [RStudio](https://rstudio.com/) (0.99.441 or later) is optional; if
you don’t use RStudio, you need to install
[pandoc](https://pandoc.org/) using the [instructions for your
operating system](https://pandoc.org/installing.html)
- A [TeX](https://de.wikipedia.org/wiki/TeX) distribution (2013 or
later; e.g., [MikTeX](https://miktex.org/) for Windows,
[MacTeX](https://tug.org/mactex/) for Mac, obviously, or [TeX
Live](https://www.tug.org/texlive/) for Linux)
- If you are running **Windows**, use MikTex if possible.
Currently, pandoc and the Windows version of Tex Live [don’t
seem to like each
other](https://github.com/rstudio/rmarkdown/issues/6). Make sure
you install the *complete*—not the basic—version.

### Install prereg

Expand All @@ -27,7 +51,8 @@ You can install the stable version of `prereg` from CRAN
install.packages("prereg")
```

or the development version from this GitHub repository (you may have to install the `devtools` package first).
or the development version from this GitHub repository (you may have to
install the `devtools` package first).

``` r
install.packages("devtools")
Expand All @@ -36,7 +61,8 @@ devtools::install_github("crsh/prereg")

### Create a preregistration document

Once you have installed the `prereg` you can select the templates when creating a new R Markdown file through the RStudio menus.
Once you have installed the `prereg` you can select the templates when
creating a new R Markdown file through the RStudio menus.

![](tools/images/template_selection.png)

Expand All @@ -46,13 +72,15 @@ Once you have installed the `prereg` you can select the templates when creating

![](tools/images/prereg_page1.png) ![](tools/images/prereg_page2.png)

The template file contains comments that provide further details on how to fill in the form but are invisible in the final PDF document.
The template file contains comments that provide further details on how
to fill in the form but are invisible in the final PDF document.

![](tools/images/prereg_rmd.png)

#### Using prereg without RStudio

If you want to use `prereg` without RStudio you can use the `rmarkdown::render` function to create preregistration documents:
If you want to use `prereg` without RStudio you can use the
`rmarkdown::render` function to create preregistration documents:

``` r
# Create new COS preregistration challenge R Markdown file
Expand All @@ -68,19 +96,44 @@ rmarkdown::draft(
rmarkdown::render("my_preregistration.Rmd")
```

Acknowledgements
----------------
## Uploading your preregistration

After knitting your preregistration to a PDF file using this package,
you may upload this protocol to a trustworthy repository to complete
your preregistration. Possible repositories for this are:

- [Preregistration in Psychology](https://prereg-psych.org/): A
preregistration platform provided by the Leibniz Institute for
Psychology (ZPID) which focuses on psychological research
- [Open Science Framework](https://osf.io/prereg/): An
interdisciplinary platform provided by the Center for Open Science
where preregistrations as well as other materials and data can be
uploaded

## Acknowledgments

The templates for the preregistrations were developed by the [Center for Open Science](https://cos.io/prereg/), [AsPredicted.org](http://aspredicted.org), and Anna Elisabeth van 't Veer and Roger Giner-Sorolla, respectively. I'm thankful for their permission to use their material in this package.
The templates for the preregistrations were developed by the [Center for
Open Science](https://www.cos.io/initiatives/prereg),
[AsPredicted.org](https://aspredicted.org/), Anna Elisabeth van ’t Veer
and Roger Giner-Sorolla, and a task force composed of members of the
American Psychological Association (APA), the British Psychological
Society (BPS), the German Psychological Society (DGPs), the Center for
Open Science (cos), and the Leibniz Institute for Psychology (ZPID). I’m
thankful for their permission to use their material in this package.

Package dependencies
--------------------
## Package dependencies

![](tools/images/unnamed-chunk-1-1.png)
![](tools/images/unnamed-chunk-1-1.png)<!-- -->

References
==========
# References

Brandt, M. J., IJzerman, H., Dijksterhuis, A., Farach, F. J., Geller, J., Giner-Sorolla, R., ... van 't Veer, A. (2014). The Replication Recipe: What makes for a convincing replication? *Journal of Experimental Social Psychology*, 50, 217--224. doi: [10.1016/j.jesp.2013.10.005](https://doi.org/10.1016/j.jesp.2013.10.005)
Brandt, M. J., IJzerman, H., Dijksterhuis, A., Farach, F. J., Geller,
J., Giner-Sorolla, R., … van ’t Veer, A. (2014). The Replication Recipe:
What makes for a convincing replication? *Journal of Experimental Social
Psychology*, 50, 217–224. doi:
[10.1016/j.jesp.2013.10.005](https://doi.org/10.1016/j.jesp.2013.10.005)

van 't Veer, A. E., & Giner-Sorolla, R. (2016). Pre-registration in social psychology---A discussion and suggested template. *Journal of Experimental Social Psychology*, 67, 2--12. doi: [10.1016/j.jesp.2016.03.004](https://doi.org/10.1016/j.jesp.2016.03.004)
van ’t Veer, A. E., & Giner-Sorolla, R. (2016). Pre-registration in
social psychology—A discussion and suggested template. *Journal of
Experimental Social Psychology*, 67, 2–12. doi:
[10.1016/j.jesp.2016.03.004](https://doi.org/10.1016/j.jesp.2016.03.004)
41 changes: 32 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
# Test environments
## Test environments

* local OS X 10.12.6 install, R 3.5.1
* Fedora Linux, R-devel, clang, gfortran (r-hub)
* Ubuntu Linux 16.04 LTS, R-release, GCC (r-hub)
* macOS 10.15.7 Catalina, R 4.0.2 (local)
* macOS 10.13.6 High Sierra, R-release, brew (r-hub)
* Ubuntu 16.04.6 Xenial, R-oldrel (Travis-CI)
* Ubuntu 16.04.6 Xenial, R-release (Travis-CI)
* Ubuntu 16.04.6 Xenial, R-devel (Travis-CI)
* Debian Linux, R-devel, GCC (r-hub)
* Windows Server 2008 R2 SP1, R-devel, 32/64 bit (r-hub)
* Windows Server 2008, R-oldrelease (win-builder)
* Windows Server 2008, R-oldrel (win-builder)
* Windows Server 2008, R-release (win-builder)

## R CMD check results
There were no ERRORs, WARNINGs, or NOTEs.

r-hub and win-builder CRAN check notes "Author field differs from that derived from Authors@R" due to the ORCID id auto-expansion to a URL.
0 errors | 0 warnings | 1 note

## Downstream dependencies
There are no downstream dependencies.
## Comments

This is a resubmission. Addresses 1 note:

> Found the following (possibly) invalid URLs:
URL: https://cos.io/prereg/ (moved to https://www.cos.io/initiatives/prereg)
From: README.md
Status: 200
Message: OK

* Followed moved content

I keep seeing one issue:

> Found the following (possibly) invalid URLs
Found the following (possibly) invalid URLs:
URL: https://aspredicted.org/
From: man/prereg.Rd
Status: 406
Message: Not Acceptable

But URL is valid.
1 change: 1 addition & 0 deletions inst/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# prereg 0.5.0

- New template for preregistration of Registered Reports (based on: https://osf.io/93znh/). See `?rr_prereg`. (suggested by @crsh #4, PR by @LisaSpitzer, #10)
- New template for preregistration for Quantitative Research in Psychology. See `?psyquant_prereg`. (PR by @LisaSpitzerZPID, #15)

# prereg 0.4.0

Expand Down
Loading

0 comments on commit fa449db

Please sign in to comment.