├── .Rbuildignore ├── .gitattributes ├── .gitignore ├── DESCRIPTION ├── LICENSE ├── LICENSE.md ├── NAMESPACE ├── NEWS.md ├── R ├── build.R ├── initialize.R └── maintain.R ├── README.md ├── _pkgdown.yml ├── docs ├── 404.html ├── LICENSE-text.html ├── LICENSE.html ├── apple-touch-icon-120x120.png ├── apple-touch-icon-152x152.png ├── apple-touch-icon-180x180.png ├── apple-touch-icon-60x60.png ├── apple-touch-icon-76x76.png ├── apple-touch-icon.png ├── articles │ ├── imgs │ │ ├── new-rd.png │ │ ├── package-build.png │ │ ├── pkgdown-build.png │ │ ├── r-package-skeleton.png │ │ ├── roxygen-insert.png │ │ ├── roxygen.png │ │ ├── vertical-new.png │ │ ├── vertical-project.png │ │ ├── vertical-structure.png │ │ ├── vertical-website.png │ │ └── vignettes.png │ ├── index.html │ ├── recs.html │ ├── recs_files │ │ ├── accessible-code-block-0.0.1 │ │ │ └── empty-anchor.js │ │ └── header-attrs-2.3 │ │ │ └── header-attrs.js │ ├── vertical.html │ └── vertical_files │ │ ├── accessible-code-block-0.0.1 │ │ └── empty-anchor.js │ │ ├── elevate-section-attrs-2.0 │ │ └── elevate-section-attrs.js │ │ ├── header-attrs-2.3 │ │ └── header-attrs.js │ │ └── jquery-1.11.3 │ │ └── jquery.min.js ├── authors.html ├── bootstrap-toc.css ├── bootstrap-toc.js ├── docsearch.css ├── docsearch.js ├── extra.css ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── index.html ├── link.svg ├── logo.png ├── manuscript │ └── manuscript.pdf ├── news │ └── index.html ├── pkgdown.css ├── pkgdown.js ├── pkgdown.yml ├── reference │ ├── build_vertical.html │ ├── figures │ │ ├── logo.png │ │ ├── vertical-project.png │ │ ├── vertical-website.png │ │ └── vertical-workflow.png │ ├── index.html │ ├── init_jspsych.html │ ├── init_jspsychr.html │ ├── init_papaja.html │ ├── init_poster.html │ ├── init_slides.html │ ├── init_som.html │ ├── suggest_yml.html │ └── vertical_project.html └── sitemap.xml ├── inst ├── rmarkdown │ └── templates │ │ └── slidy │ │ ├── skeleton │ │ └── skeleton.Rmd │ │ └── template.yaml ├── rstudio │ ├── addins.dcf │ └── templates │ │ └── project │ │ ├── logo.png │ │ └── vertical_project.dcf ├── templates │ ├── _pkgdown.yml │ ├── data.R │ ├── experiment.html │ └── preprocess.R └── vertical │ ├── _pkgdown.yml │ └── experiment.html ├── man ├── build_vertical.Rd ├── figures │ ├── logo.png │ ├── vertical-project.png │ ├── vertical-website.png │ └── vertical-workflow.png ├── init_jspsych.Rd ├── init_jspsychr.Rd ├── init_papaja.Rd ├── init_poster.Rd ├── init_slides.Rd ├── init_som.Rd ├── suggest_yml.Rd └── vertical_project.Rd ├── manuscript ├── images │ ├── build-install.png │ ├── build-tools.png │ ├── empty-package-folders.png │ ├── exampleData-help.png │ ├── knit-readme.png │ ├── r-package-skeleton.png │ ├── rstudio-create-project.png │ ├── vertical-project.png │ ├── vertical-website.png │ └── vertical-workflow.png ├── manuscript.Rmd ├── manuscript.tex ├── r-references.bib └── references.bib ├── pkgdown ├── extra.css └── favicon │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-180x180.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-76x76.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ └── favicon.ico ├── vertical.Rproj └── vignettes ├── .gitignore ├── imgs ├── logo.png ├── new-rd.png ├── package-build.png ├── pkgdown-build.png ├── r-package-skeleton.png ├── roxygen-insert.png ├── roxygen.png ├── vertical-new.png ├── vertical-project.png ├── vertical-structure.png ├── vertical-website.png ├── vertical-workflow.png └── vignettes.png ├── recs.Rmd ├── tutorial.bib └── vertical.Rmd /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^experiments$ 4 | ^LICENSE\.md$ 5 | ^docs$ 6 | ^xtra$ 7 | ^_pkgdown\.yml$ 8 | ^pkgdown$ 9 | ^vignettes$ 10 | ^manuscript$ 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | docs/* linguist-detectable=false 2 | *.html linguist-detectable=false 3 | *.css linguist-detectable=false 4 | *.scss linguist-detectable=false 5 | *.js linguist-detectable=false 6 | *.tex linguist-detectable=false 7 | *.R linguist-language=R 8 | *.Rmd linguist-language=R 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | inst/doc 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: vertical 2 | Title: Reproducible worfklow for psychological science research asset creation and communication 3 | Version: 0.1.0.0000 4 | URL: https://github.com/CrumpLab/vertical 5 | BugReports: https://github.com/CrumpLab/vertical/issues 6 | Authors@R: c( 7 | person(given = "Matthew J. C.", 8 | family = "Crump", 9 | role = c("aut", "cre"), 10 | email = "mcrump@brooklyn.cuny.edu", 11 | comment = c(ORCID = "0000-0002-5612-0090")), 12 | person(given = "Matti", 13 | family = "Vuorre", 14 | role = c("aut"), 15 | email = "mv2521@columbia.edu", 16 | comment = c(ORCID = "0000-0001-5052-066X")) 17 | ) 18 | Description: Demonstrates the use of multiple R packages for reproducible project management environment for psychological research. This includes using xprmntr and jsPsych (a JavaScript library) for designing web and lab-based experiments. papaja for writing APA papers. The tidyverse for and R Markdown for general data-wrangling, analysis, and notetaking. And, pkgdown and R package templates for file management, function and data sharing, and general dissemination via webpages using GitHub. 19 | License: MIT + file LICENSE 20 | Encoding: UTF-8 21 | LazyData: true 22 | RoxygenNote: 7.0.2 23 | Roxygen: list(markdown = TRUE) 24 | Imports: 25 | devtools, 26 | usethis, 27 | pkgdown, 28 | httr, 29 | papaja, 30 | yaml, 31 | posterdown, 32 | rmarkdown, 33 | git2r, 34 | rstudioapi 35 | Remotes: 36 | github::crsh/papaja, 37 | github::CrumpLab/jspsychr 38 | Suggests: 39 | knitr 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2019 2 | COPYRIGHT HOLDER: Matt Crump 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2019 Matt Crump 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(build_vertical) 4 | export(init_jspsych) 5 | export(init_jspsychr) 6 | export(init_papaja) 7 | export(init_poster) 8 | export(init_slides) 9 | export(init_som) 10 | export(suggest_yml) 11 | export(vertical_project) 12 | -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # vertical 0.1.0.0000 2 | 3 | * Manuscript published online at Behavioral Research Methods 4 | 5 | # vertical 0.0.1.0000 6 | 7 | * clean up branch to include only master and dev 8 | 9 | # vertical 0.0.0.9900 10 | 11 | * `vertical_project()` is now a single function for initialization 12 | * `build_vertical()` removes yml updates 13 | * yml suggestion is done by `suggest_yml()` 14 | * minor edits to tutorial 15 | 16 | # vertical 0.0.0.9400 17 | 18 | * update_yml default is FALSE in build_vertical. Need explicitly overwrite 19 | * enhanced `init_vertical_project()` to allow interactive dialogue for creation, or direct creation by script. 20 | 21 | # vertical 0.0.0.9300 22 | 23 | * improved documentation, added markdown support 24 | * `init_vertical_project()` can be used to initialize a vertical project from the command line, both within an existing project, or to create new one 25 | * added link to rparp preprint 26 | * fixed `init_supplemental()` bug 27 | 28 | # vertical 0.0.0.9200 29 | 30 | * added init functions to add individual vertical components to a vertical project from the console 31 | * added `update_yml()` to scrape vertical component folders and update `_pkgdown.yml` to include .Rmds in each folder and subfolder in respective component tabs on the website 32 | * extended functionality of `build_vertical()` to update `_pkgdown.yml` on build with `update_yml()`. Also, `build_vertical()` now renders all .Rmds in any main folder of a vertical component. Currently, sub folders are also rendered in vignettes, but not other component folders. 33 | * Updated getting started tutorial and readme 34 | 35 | # vertical 0.0.0.9100 36 | 37 | This version is a rethinking of vertical's back-end functionality with the goal of making vertical more lightweight and portable. 38 | 39 | * Initialize project components from source 40 | * When a vertical project is created, all subcomponents are pulled from their source, instead of being hard-coded to vertical, making the package more portable, easier to maintain, and lightweight 41 | * Select components 42 | * When a vertical project is created, users can choose which components to initialize. 43 | * Now includes a poster template 44 | * New contributor: Matti Vuorre 45 | 46 | 47 | # vertical 0.0.0.9000 48 | 49 | * added vertical project template 50 | * Added a `NEWS.md` file to track changes to the package. 51 | -------------------------------------------------------------------------------- /R/build.R: -------------------------------------------------------------------------------- 1 | #' Build vertical project 2 | #' 3 | #' Build the website associated with a vertical project. This is mostly a wrapper to `pkgdown::build_site()`, but extended to render .Rmd content from other folders. 4 | #' 5 | #' @param clean logical, when clean=TRUE (the default), the `docs` folder is cleaned (e.g., completely wiped) using `pkgdown::clean_site()`, otherwise when clean=FALSE `clean_site()` will not be run. 6 | #' @param ... params, pass additional parameters to `pkgdown::build_site(...)` 7 | #' @section Usage: 8 | #' ``` 9 | #' build_vertical() 10 | #' ``` 11 | #' 12 | #' @export 13 | build_vertical <- function(clean=TRUE,...) { 14 | 15 | if(clean == TRUE) pkgdown::clean_site() 16 | pkgdown::build_site(...) 17 | 18 | for (i in list.files(pattern = "\\.Rmd", recursive = TRUE)) { 19 | if(unlist(strsplit(i,split=.Platform$file.sep))[1] %in% c("experiments","vignettes","inst") == FALSE){ 20 | usethis::ui_info(paste("Knitting ", i)) 21 | out.file <- rmarkdown::render(i, output_dir = paste0("docs/", dirname(i)), quiet=TRUE) 22 | if (!any(grepl(tools::file_path_sans_ext(i), readLines("_pkgdown.yml")))) { 23 | usethis::ui_info(paste(file.path(dirname(i),basename(out.file)), 24 | " is not linked to in navbar. Please edit _pkgdown.yml")) 25 | } 26 | } 27 | } 28 | 29 | if (dir.exists("experiments")) { 30 | dir.create("docs/experiments") 31 | #file.copy("experiments", "docs", recursive = TRUE) 32 | } 33 | } 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /R/initialize.R: -------------------------------------------------------------------------------- 1 | #' Initialize a **vertical** project 2 | #' 3 | #' This function is called when a **vertical** R project is created. 4 | #' 5 | #' @param path Name (and location) of package. Must be a valid R package name. 6 | #' @param init_git Initialize a git repository? (TRUE) 7 | #' @param init_data Initialize data? (TRUE) 8 | #' @param init_ms Initialize APA6 manuscript R Markdown template? (TRUE) 9 | #' @param init_som Initialize supplementary materials R Markdown template? (TRUE) 10 | #' @param init_slides Initialize an R Markdown slide template? (TRUE) 11 | #' @param init_poster Initialize an R Markdown poster template? (TRUE) 12 | #' @param init_exp Initialize a jsPsych experiment template? (FALSE) 13 | #' @param ... Not used. 14 | #' 15 | #' @export 16 | vertical_project <- function(path = NULL, 17 | init_git = TRUE, 18 | init_data = TRUE, 19 | init_ms = TRUE, 20 | init_som = TRUE, 21 | init_slides = TRUE, 22 | init_poster = TRUE, 23 | init_exp = FALSE, 24 | ...) { 25 | if(is.null(path)) { 26 | rstudioapi::executeCommand('newProject', quiet = FALSE) 27 | return(usethis::ui_info("Opening RStudio Project Template, select New Directory, then Vertical Research Project")) 28 | } 29 | 30 | dots <- list(...) 31 | if (length(dots) == 0) { 32 | dots <- append(dots, list( 33 | init_git = init_git, 34 | init_data = init_data, 35 | init_ms = init_ms, 36 | init_som = init_som, 37 | init_slides = init_slides, 38 | init_poster = init_poster, 39 | init_exp = init_exp 40 | )) 41 | } 42 | usethis::create_package(path) 43 | setwd(path) 44 | usethis::use_template(template = "_pkgdown.yml", 45 | ignore = TRUE, 46 | package = "vertical") 47 | if (dots$init_git) { 48 | git2r::init() 49 | usethis::use_git_ignore(c(".Rhistory", ".RData", ".Rproj.user")) 50 | } 51 | if (dots$init_data) init_data() 52 | if (dots$init_ms) init_papaja() 53 | if (dots$init_slides) init_slides() 54 | if (dots$init_poster) init_poster() 55 | if (dots$init_exp) init_jspsych() 56 | if (dots$init_som) init_som() 57 | 58 | } 59 | 60 | init_data <- function() { 61 | usethis::use_directory("data-raw", ignore = TRUE) 62 | usethis::use_template( 63 | template = "preprocess.R", 64 | save_as = "data-raw/preprocess.R", 65 | package = "vertical" 66 | ) 67 | usethis::use_template( 68 | template = "data.R", 69 | save_as = "R/data.R", 70 | data = list(dataname = "mydata"), 71 | package = "vertical" 72 | ) 73 | } 74 | 75 | #' Initialize manuscript 76 | #' 77 | #' Initialize `papaja` R Markdown APA manuscript in the `manuscript` folder. 78 | #' 79 | #' Run this function to add a `papaja` manuscript component to a vertical project at a later time (assuming it wasn't created by `vertical_project()` or `init_vertical_project()` during initialization.) 80 | #' 81 | #' See the [papaja documentation](https://crsh.github.io/papaja_man/) for more information. 82 | #' 83 | #' @export 84 | init_papaja <- function() { 85 | usethis::use_directory("manuscript", ignore = TRUE) 86 | rmarkdown::draft( 87 | file = "manuscript/manuscript.Rmd", 88 | template = "apa6", 89 | package = "papaja", 90 | edit = FALSE, 91 | create_dir = FALSE 92 | ) 93 | } 94 | 95 | #' Initialize supplemental materials 96 | #' 97 | #' Initialize R Markdown SOM in the `vignettes` of a vertical project. 98 | #' 99 | #' A wrapper to `usethis` for creating a `vignettes` folder, and adding an example .Rmd. This function is used during vertical project creation. Once a vertical project is established, we suggest a `usethis` approach to adding articles to vignettes. The `usethis` approach creates a new .Rmd in `vignettes`, you define the name and title, and the new file is opened for editing. 100 | #' ``` 101 | #' usethis::use_article(name, title = name) 102 | #' usethis::use_article("Supplementary_2", title = "Blah blah blah") 103 | #' ``` 104 | #' See [usethis documentation](https://usethis.r-lib.org/reference/use_vignette.html) for more information. 105 | #' 106 | #' @export 107 | init_som <- function() { 108 | usethis::use_directory("vignettes") 109 | usethis::use_template( 110 | template = "article.Rmd", 111 | save_as = "vignettes/som.Rmd", 112 | ignore = TRUE, 113 | data = list(vignette_title="Supplementary analyses", 114 | Package = basename(getwd())), 115 | package = "usethis" 116 | ) 117 | } 118 | 119 | #' Initialize slides 120 | #' 121 | #' Initialize slidy R Markdown template in slides folder of a vertical project 122 | #' 123 | #' Run on initialization, and can be run from the console to include a slides folder and slidy template at a later time. See the [slidy documentation](https://bookdown.org/yihui/rmarkdown/slidy-presentation.html) for additional information. There are other R markdown slide templates not suggested by vertical, but that are very good alternatives (e.g., `xaringan`). Simply add your template of choice to the slides folder. 124 | #' 125 | #' @export 126 | init_slides <- function() { 127 | usethis::use_directory("slides", ignore = TRUE) 128 | rmarkdown::draft( 129 | file = "slides/slides.Rmd", 130 | template = "slidy", 131 | package = "vertical", 132 | edit = FALSE, 133 | create_dir = FALSE 134 | ) 135 | } 136 | 137 | #' Initialize posters 138 | #' 139 | #' Initialize R Markdown `posterdown` template in `posters` folder of a vertical project 140 | #' 141 | #' Run on initialization, and can be run from the console to include a posters folder and poster template at a later time. See the [posterdown documentation](https://github.com/brentthorne/posterdown) for more information. Note that `vertical` loads one of the three possible `posterdown` templates. 142 | #' 143 | #' @export 144 | init_poster <- function() { 145 | usethis::use_directory("posters", ignore = TRUE) 146 | rmarkdown::draft( 147 | file = "posters/poster.Rmd", 148 | template = "posterdown_html", 149 | package = "posterdown", 150 | edit = FALSE, 151 | create_dir = FALSE 152 | ) 153 | } 154 | 155 | #' Initialize jsPsych experiment 156 | #' 157 | #' Initialize a jsPsych experiment in the `experiments` folder of a vertical project 158 | #' 159 | #' This function does the following: 160 | #' 1. creates the `experiments` folder 161 | #' 2. Downloads the most recent `jspsych`` library from 162 | #' 3. Adds a minimal `jspsych`` example experiment to `experiments/experiment-1/` 163 | #' 164 | #' See the [jspsych documentation](https://www.jspsych.org) for more information about using jspsych to build behavioral experiments for the web. 165 | #' 166 | #' @export 167 | init_jspsych <- function() { 168 | usethis::use_directory("experiments", ignore = TRUE) 169 | usethis::use_directory("experiments/experiment-1") 170 | # Get latest jsPsych version download link 171 | ver <- basename(httr::GET("https://github.com/jspsych/jsPsych/releases/latest")$url) 172 | loc_from <- paste0( 173 | "https://github.com/jspsych/jsPsych/releases/download/", ver, 174 | "/jspsych-", sub("v", "", ver), ".zip" 175 | ) 176 | # Download, unzip, and remove .zip 177 | loc_to <- file.path("experiments", basename(loc_from)) 178 | utils::download.file(url = loc_from, loc_to) 179 | utils::unzip(loc_to, exdir = sub(".zip", "", loc_to)) 180 | unlink(loc_to) 181 | # Suggest deleting unnecessary large folder 182 | message(paste0("Consider removing ", sub(".zip", "", loc_to), "/examples")) 183 | usethis::use_template(template = "experiment.html", 184 | save_as = "experiments/experiment-1/experiment.html", 185 | package = "vertical") 186 | } 187 | 188 | #' Initialize jspsychr experiment 189 | #' 190 | #' Initialize a jspsychr template in the `experiments` folder of a vertical project 191 | #' 192 | #' This function does the following: 193 | #' 1. creates the `experiments` folder 194 | #' 2. Adds a `jspsychr` template (Experiment_1), which is an example of using R Studio and R Markdown to author a `jspsych` experiment 195 | #' 196 | #' See the [jspsych documentation](https://www.jspsych.org) for more information about using jspsych to build behavioral experiments for the web. 197 | #' 198 | #' See the [jspsychr documentation](https://crumplab.github.io/jspsychr/) for more information about using R Markdown to write `jspsych` experiments. 199 | #' 200 | #' @export 201 | init_jspsychr <- function(){ 202 | usethis::use_directory("experiments", ignore = TRUE) 203 | # add jspsychr template example 204 | rmarkdown::draft( 205 | file = "experiments/Experiment_1.Rmd", 206 | template = "jspsychr", 207 | package = "jspsychr", 208 | edit = FALSE, 209 | create_dir = TRUE 210 | ) 211 | } 212 | -------------------------------------------------------------------------------- /R/maintain.R: -------------------------------------------------------------------------------- 1 | #' Suggest yml for _pkgdown.yml 2 | #' 3 | #' Run `vertical::suggest_yml` to generate a suggestions for populating `_pkgdown.yml`. The suggested yml is written to the console. Copy this to `_pkgdown.yml` and modify as necessary. 4 | #' 5 | #' @return yml copied to console 6 | #' 7 | #' @details `_pkgdown.yml` can be further modified by hand to achieve various customizations to the website. See the [pkgdown documentation](https://pkgdown.r-lib.org/reference/build_site.html) for additional information. 8 | #' 9 | #' @export 10 | #' 11 | suggest_yml <- function(){ 12 | temp_yml <- yaml::read_yaml("_pkgdown.yml") 13 | exclude_folders <- c("experiments","data","data-raw","docs","R","man","inst") 14 | 15 | # write structure and components 16 | for (i in list.files(pattern = "\\.Rmd", recursive = TRUE)) { 17 | assets <- unlist(strsplit(i,split=.Platform$file.sep)) 18 | if(assets[1] %in% exclude_folders == FALSE ){ 19 | if (assets[1] == "vignettes") assets[1] <- "articles" 20 | if(assets[1] %in% temp_yml$navbar$structure$left == FALSE) temp_yml$navbar$structure$left <- c(temp_yml$navbar$structure$left,assets[1]) 21 | temp_yml$navbar$components[[assets[1]]] <- list(text = assets[1],menu = list()) 22 | } 23 | } 24 | 25 | # write titles and hrefs 26 | for (i in list.files(pattern = "\\.Rmd", recursive = TRUE)) { 27 | assets <- unlist(strsplit(i,split=.Platform$file.sep)) 28 | j <- assets 29 | if(assets[1] %in% exclude_folders == FALSE ){ 30 | if (assets[1] == "vignettes") assets[1] <- "articles"; j[1] <- "articles" 31 | temp_yml$navbar$components[[assets[1]]]$menu <- c( 32 | temp_yml$navbar$components[[assets[1]]]$menu, 33 | list(list(text = rmarkdown::yaml_front_matter(i)$title, 34 | href=gsub(".Rmd",".html",paste(j,collapse="/")))) 35 | ) 36 | # [todo] handle file types? only html so far 37 | } 38 | } 39 | 40 | # print suggested yml to console 41 | usethis::ui_info("Copy to _pkgdown.yml then modify as needed") 42 | usethis::ui_info("tip: change .html to .pdf in hrefs for papaja manuscripts, or other .pdf assets") 43 | filename <- tempfile() 44 | con <- file(filename, "w") 45 | yaml::write_yaml(temp_yml, con) 46 | close(con) 47 | writeLines(readLines(filename)) 48 | unlink(filename) 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vertical 2 | 3 | 4 | [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) 5 | 6 | 7 | 8 | ## Installation 9 | 10 | The devtools library is required for installation: 11 | 12 | ``` r 13 | #install.packages("devtools") 14 | devtools::install_github("CrumpLab/vertical") 15 | ``` 16 | 17 | ## Quick start 18 | 19 | ``` 20 | # initialize new project from console 21 | vertical::vertical_project() 22 | 23 | # build the website 24 | vertical::build_vertical() 25 | ``` 26 | 27 | NOTE: after restarting RStudio, you can make a vertical project by choosing File > New Project... in RStudio, and choosing the Vertical Research Project template. 28 | 29 | Read the [getting started](https://crumplab.github.io/vertical/articles/vertical.html) tutorial to learn more about using `vertical`. And, watch [vertical tutorials on youtube](https://www.youtube.com/playlist?list=PLDtczbtj66Q4jn-08HaBbz6fAVdlQ3EQm), still in progress adding more as we find time. 30 | 31 | ## What is vertical? 32 | 33 | `vertical` is a workflow for creating, curating, and communicating research assets in psychological science in the form of a website and/or R package. It is effectively a wrapper for suggesting R Markdown templates for creating various psych research assets, and suggesting the R Package standard to curate the assets. `vertical` installs an RStudio project template with the `vertical` workflow structure, and compiles content in a `vertical` project to an R package and pkgdown website for sharing the assets. 34 | 35 | ### vertical workflow 36 | 37 | 38 | 39 | ### vertical project structure 40 | 41 | 42 | 43 | ### vertical website (via pkgdown) 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- 1 | url: https://crumplab.github.io/vertical 2 | 3 | template: 4 | opengraph: 5 | img: logo.png 6 | params: 7 | ganalytics: UA-79429674-9 8 | 9 | development: 10 | mode: unreleased 11 | 12 | toc: 13 | depth: 2 14 | 15 | pkgdown: 16 | as_is: true 17 | 18 | navbar: 19 | structure: 20 | left: 21 | - home 22 | - articles 23 | - reference 24 | - suggestions 25 | right: 26 | - news 27 | - github 28 | components: 29 | home: 30 | icon: fa-home fa-lg 31 | href: index.html 32 | reference: 33 | text: Functions 34 | href: reference/index.html 35 | github: 36 | text: source code 37 | icon: fa-lg fa-github 38 | href: https://github.com/CrumpLab/vertical 39 | articles: 40 | text: Articles 41 | menu: 42 | - text: Sharing and organizing research products as R Packages 43 | href: https://link.springer.com/article/10.3758/s13428-020-01436-x 44 | - text: Preprint 45 | href: https://psyarxiv.com/jks2u/ 46 | suggestions: 47 | text: Suggested R Packages 48 | href: articles/recs.html 49 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page not found (404) • vertical 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 | 65 | 66 | 67 | 68 | 69 | 76 | 77 | 78 | 79 | 80 | 81 |
82 |
83 | 147 | 148 | 149 | 150 |
151 | 152 |
153 |
154 | 157 | 158 | Content not found. Please use links in the navbar. 159 | 160 |
161 | 162 | 167 | 168 |
169 | 170 | 171 | 172 |
173 | 176 | 177 |
178 |

Site built with pkgdown 1.5.1.

179 |
180 | 181 |
182 |
183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | -------------------------------------------------------------------------------- /docs/LICENSE-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | License • vertical 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 | 65 | 66 | 67 | 68 | 69 | 76 | 77 | 78 | 79 | 80 | 81 |
82 |
83 | 147 | 148 | 149 | 150 |
151 | 152 |
153 |
154 | 157 | 158 |
YEAR: 2019
159 | COPYRIGHT HOLDER: Matt Crump
160 | 
161 | 162 |
163 | 164 | 169 | 170 |
171 | 172 | 173 | 174 |
175 | 178 | 179 |
180 |

Site built with pkgdown 1.5.1.

181 |
182 | 183 |
184 |
185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /docs/LICENSE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | MIT License • vertical 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 | 65 | 66 | 67 | 68 | 69 | 76 | 77 | 78 | 79 | 80 | 81 |
82 |
83 | 147 | 148 | 149 | 150 |
151 | 152 |
153 |
154 | 157 | 158 |
159 | 160 |

Copyright (c) 2019 Matt Crump

161 |

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

162 |

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

163 |

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

164 |
165 | 166 |
167 | 168 | 173 | 174 |
175 | 176 | 177 | 178 |
179 | 182 | 183 |
184 |

Site built with pkgdown 1.5.1.

185 |
186 | 187 |
188 |
189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /docs/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/articles/imgs/new-rd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/new-rd.png -------------------------------------------------------------------------------- /docs/articles/imgs/package-build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/package-build.png -------------------------------------------------------------------------------- /docs/articles/imgs/pkgdown-build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/pkgdown-build.png -------------------------------------------------------------------------------- /docs/articles/imgs/r-package-skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/r-package-skeleton.png -------------------------------------------------------------------------------- /docs/articles/imgs/roxygen-insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/roxygen-insert.png -------------------------------------------------------------------------------- /docs/articles/imgs/roxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/roxygen.png -------------------------------------------------------------------------------- /docs/articles/imgs/vertical-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/vertical-new.png -------------------------------------------------------------------------------- /docs/articles/imgs/vertical-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/vertical-project.png -------------------------------------------------------------------------------- /docs/articles/imgs/vertical-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/vertical-structure.png -------------------------------------------------------------------------------- /docs/articles/imgs/vertical-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/vertical-website.png -------------------------------------------------------------------------------- /docs/articles/imgs/vignettes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/articles/imgs/vignettes.png -------------------------------------------------------------------------------- /docs/articles/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Articles • vertical 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 | 65 | 66 | 67 | 68 | 69 | 76 | 77 | 78 | 79 | 80 | 81 |
82 |
83 | 147 | 148 | 149 | 150 |
151 | 152 |
153 |
154 | 157 | 158 |
159 |

All vignettes

160 |

161 | 162 |
163 |
Suggested R Packages
164 |
165 |
Get started using vertical
166 |
167 |
168 |
169 |
170 |
171 | 172 | 173 |
174 | 177 | 178 |
179 |

Site built with pkgdown 1.5.1.

180 |
181 | 182 |
183 |
184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /docs/articles/recs_files/accessible-code-block-0.0.1/empty-anchor.js: -------------------------------------------------------------------------------- 1 | // Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> 2 | // v0.0.1 3 | // Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. 4 | 5 | document.addEventListener('DOMContentLoaded', function() { 6 | const codeList = document.getElementsByClassName("sourceCode"); 7 | for (var i = 0; i < codeList.length; i++) { 8 | var linkList = codeList[i].getElementsByTagName('a'); 9 | for (var j = 0; j < linkList.length; j++) { 10 | if (linkList[j].innerHTML === "") { 11 | linkList[j].setAttribute('aria-hidden', 'true'); 12 | } 13 | } 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /docs/articles/recs_files/header-attrs-2.3/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/articles/vertical_files/accessible-code-block-0.0.1/empty-anchor.js: -------------------------------------------------------------------------------- 1 | // Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> 2 | // v0.0.1 3 | // Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. 4 | 5 | document.addEventListener('DOMContentLoaded', function() { 6 | const codeList = document.getElementsByClassName("sourceCode"); 7 | for (var i = 0; i < codeList.length; i++) { 8 | var linkList = codeList[i].getElementsByTagName('a'); 9 | for (var j = 0; j < linkList.length; j++) { 10 | if (linkList[j].innerHTML === "") { 11 | linkList[j].setAttribute('aria-hidden', 'true'); 12 | } 13 | } 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /docs/articles/vertical_files/elevate-section-attrs-2.0/elevate-section-attrs.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $("div.section[class*='level'], section[class*='level']").each(function(i, el) { 3 | var $section = $(el); 4 | var $header = $section.children().filter(":header").first(); 5 | if ($header.length === 0) return; 6 | var attrs = $header[0].attributes; 7 | for (var a = 0; a < attrs.length; a++) { 8 | var nm = attrs[a].name; 9 | var val = attrs[a].value; 10 | if (nm === "class") { 11 | $section.addClass(val); 12 | $header.removeClass(val); 13 | continue; 14 | } 15 | $section.attr(nm, val); 16 | $header.attr(nm, null); 17 | } 18 | }); 19 | }); 20 | 21 | -------------------------------------------------------------------------------- /docs/articles/vertical_files/header-attrs-2.3/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/authors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Authors • vertical 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 | 65 | 66 | 67 | 68 | 69 | 76 | 77 | 78 | 79 | 80 | 81 |
82 |
83 | 147 | 148 | 149 | 150 |
151 | 152 |
153 |
154 | 157 | 158 |
    159 |
  • 160 |

    Matthew J. C. Crump. Author, maintainer. 161 |

    162 |
  • 163 |
  • 164 |

    Matti Vuorre. Author. 165 |

    166 |
  • 167 |
168 | 169 |
170 | 171 |
172 | 173 | 174 | 175 |
176 | 179 | 180 |
181 |

Site built with pkgdown 1.5.1.

182 |
183 | 184 |
185 |
186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | 6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ 7 | 8 | /* All levels of nav */ 9 | nav[data-toggle='toc'] .nav > li > a { 10 | display: block; 11 | padding: 4px 20px; 12 | font-size: 13px; 13 | font-weight: 500; 14 | color: #767676; 15 | } 16 | nav[data-toggle='toc'] .nav > li > a:hover, 17 | nav[data-toggle='toc'] .nav > li > a:focus { 18 | padding-left: 19px; 19 | color: #563d7c; 20 | text-decoration: none; 21 | background-color: transparent; 22 | border-left: 1px solid #563d7c; 23 | } 24 | nav[data-toggle='toc'] .nav > .active > a, 25 | nav[data-toggle='toc'] .nav > .active:hover > a, 26 | nav[data-toggle='toc'] .nav > .active:focus > a { 27 | padding-left: 18px; 28 | font-weight: bold; 29 | color: #563d7c; 30 | background-color: transparent; 31 | border-left: 2px solid #563d7c; 32 | } 33 | 34 | /* Nav: second level (shown on .active) */ 35 | nav[data-toggle='toc'] .nav .nav { 36 | display: none; /* Hide by default, but at >768px, show it */ 37 | padding-bottom: 10px; 38 | } 39 | nav[data-toggle='toc'] .nav .nav > li > a { 40 | padding-top: 1px; 41 | padding-bottom: 1px; 42 | padding-left: 30px; 43 | font-size: 12px; 44 | font-weight: normal; 45 | } 46 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 47 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 48 | padding-left: 29px; 49 | } 50 | nav[data-toggle='toc'] .nav .nav > .active > a, 51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 53 | padding-left: 28px; 54 | font-weight: 500; 55 | } 56 | 57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ 58 | nav[data-toggle='toc'] .nav > .active > ul { 59 | display: block; 60 | } 61 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | (function() { 6 | 'use strict'; 7 | 8 | window.Toc = { 9 | helpers: { 10 | // return all matching elements in the set, or their descendants 11 | findOrFilter: function($el, selector) { 12 | // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ 13 | // http://stackoverflow.com/a/12731439/358804 14 | var $descendants = $el.find(selector); 15 | return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); 16 | }, 17 | 18 | generateUniqueIdBase: function(el) { 19 | var text = $(el).text(); 20 | var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); 21 | return anchor || el.tagName.toLowerCase(); 22 | }, 23 | 24 | generateUniqueId: function(el) { 25 | var anchorBase = this.generateUniqueIdBase(el); 26 | for (var i = 0; ; i++) { 27 | var anchor = anchorBase; 28 | if (i > 0) { 29 | // add suffix 30 | anchor += '-' + i; 31 | } 32 | // check if ID already exists 33 | if (!document.getElementById(anchor)) { 34 | return anchor; 35 | } 36 | } 37 | }, 38 | 39 | generateAnchor: function(el) { 40 | if (el.id) { 41 | return el.id; 42 | } else { 43 | var anchor = this.generateUniqueId(el); 44 | el.id = anchor; 45 | return anchor; 46 | } 47 | }, 48 | 49 | createNavList: function() { 50 | return $(''); 51 | }, 52 | 53 | createChildNavList: function($parent) { 54 | var $childList = this.createNavList(); 55 | $parent.append($childList); 56 | return $childList; 57 | }, 58 | 59 | generateNavEl: function(anchor, text) { 60 | var $a = $(''); 61 | $a.attr('href', '#' + anchor); 62 | $a.text(text); 63 | var $li = $('
  • '); 64 | $li.append($a); 65 | return $li; 66 | }, 67 | 68 | generateNavItem: function(headingEl) { 69 | var anchor = this.generateAnchor(headingEl); 70 | var $heading = $(headingEl); 71 | var text = $heading.data('toc-text') || $heading.text(); 72 | return this.generateNavEl(anchor, text); 73 | }, 74 | 75 | // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). 76 | getTopLevel: function($scope) { 77 | for (var i = 1; i <= 6; i++) { 78 | var $headings = this.findOrFilter($scope, 'h' + i); 79 | if ($headings.length > 1) { 80 | return i; 81 | } 82 | } 83 | 84 | return 1; 85 | }, 86 | 87 | // returns the elements for the top level, and the next below it 88 | getHeadings: function($scope, topLevel) { 89 | var topSelector = 'h' + topLevel; 90 | 91 | var secondaryLevel = topLevel + 1; 92 | var secondarySelector = 'h' + secondaryLevel; 93 | 94 | return this.findOrFilter($scope, topSelector + ',' + secondarySelector); 95 | }, 96 | 97 | getNavLevel: function(el) { 98 | return parseInt(el.tagName.charAt(1), 10); 99 | }, 100 | 101 | populateNav: function($topContext, topLevel, $headings) { 102 | var $context = $topContext; 103 | var $prevNav; 104 | 105 | var helpers = this; 106 | $headings.each(function(i, el) { 107 | var $newNav = helpers.generateNavItem(el); 108 | var navLevel = helpers.getNavLevel(el); 109 | 110 | // determine the proper $context 111 | if (navLevel === topLevel) { 112 | // use top level 113 | $context = $topContext; 114 | } else if ($prevNav && $context === $topContext) { 115 | // create a new level of the tree and switch to it 116 | $context = helpers.createChildNavList($prevNav); 117 | } // else use the current $context 118 | 119 | $context.append($newNav); 120 | 121 | $prevNav = $newNav; 122 | }); 123 | }, 124 | 125 | parseOps: function(arg) { 126 | var opts; 127 | if (arg.jquery) { 128 | opts = { 129 | $nav: arg 130 | }; 131 | } else { 132 | opts = arg; 133 | } 134 | opts.$scope = opts.$scope || $(document.body); 135 | return opts; 136 | } 137 | }, 138 | 139 | // accepts a jQuery object, or an options object 140 | init: function(opts) { 141 | opts = this.helpers.parseOps(opts); 142 | 143 | // ensure that the data attribute is in place for styling 144 | opts.$nav.attr('data-toggle', 'toc'); 145 | 146 | var $topContext = this.helpers.createChildNavList(opts.$nav); 147 | var topLevel = this.helpers.getTopLevel(opts.$scope); 148 | var $headings = this.helpers.getHeadings(opts.$scope, topLevel); 149 | this.helpers.populateNav($topContext, topLevel, $headings); 150 | } 151 | }; 152 | 153 | $(function() { 154 | $('nav[data-toggle="toc"]').each(function(i, el) { 155 | var $nav = $(el); 156 | Toc.init($nav); 157 | }); 158 | }); 159 | })(); 160 | -------------------------------------------------------------------------------- /docs/docsearch.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // register a handler to move the focus to the search bar 4 | // upon pressing shift + "/" (i.e. "?") 5 | $(document).on('keydown', function(e) { 6 | if (e.shiftKey && e.keyCode == 191) { 7 | e.preventDefault(); 8 | $("#search-input").focus(); 9 | } 10 | }); 11 | 12 | $(document).ready(function() { 13 | // do keyword highlighting 14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ 15 | var mark = function() { 16 | 17 | var referrer = document.URL ; 18 | var paramKey = "q" ; 19 | 20 | if (referrer.indexOf("?") !== -1) { 21 | var qs = referrer.substr(referrer.indexOf('?') + 1); 22 | var qs_noanchor = qs.split('#')[0]; 23 | var qsa = qs_noanchor.split('&'); 24 | var keyword = ""; 25 | 26 | for (var i = 0; i < qsa.length; i++) { 27 | var currentParam = qsa[i].split('='); 28 | 29 | if (currentParam.length !== 2) { 30 | continue; 31 | } 32 | 33 | if (currentParam[0] == paramKey) { 34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); 35 | } 36 | } 37 | 38 | if (keyword !== "") { 39 | $(".contents").unmark({ 40 | done: function() { 41 | $(".contents").mark(keyword); 42 | } 43 | }); 44 | } 45 | } 46 | }; 47 | 48 | mark(); 49 | }); 50 | }); 51 | 52 | /* Search term highlighting ------------------------------*/ 53 | 54 | function matchedWords(hit) { 55 | var words = []; 56 | 57 | var hierarchy = hit._highlightResult.hierarchy; 58 | // loop to fetch from lvl0, lvl1, etc. 59 | for (var idx in hierarchy) { 60 | words = words.concat(hierarchy[idx].matchedWords); 61 | } 62 | 63 | var content = hit._highlightResult.content; 64 | if (content) { 65 | words = words.concat(content.matchedWords); 66 | } 67 | 68 | // return unique words 69 | var words_uniq = [...new Set(words)]; 70 | return words_uniq; 71 | } 72 | 73 | function updateHitURL(hit) { 74 | 75 | var words = matchedWords(hit); 76 | var url = ""; 77 | 78 | if (hit.anchor) { 79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; 80 | } else { 81 | url = hit.url + '?q=' + escape(words.join(" ")); 82 | } 83 | 84 | return url; 85 | } 86 | -------------------------------------------------------------------------------- /docs/extra.css: -------------------------------------------------------------------------------- 1 | .nav-stacked>li>a { 2 | position: relative; 3 | display: block; 4 | padding: 2px 15px; 5 | } 6 | -------------------------------------------------------------------------------- /docs/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/favicon-16x16.png -------------------------------------------------------------------------------- /docs/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/favicon-32x32.png -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/favicon.ico -------------------------------------------------------------------------------- /docs/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/logo.png -------------------------------------------------------------------------------- /docs/manuscript/manuscript.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/manuscript/manuscript.pdf -------------------------------------------------------------------------------- /docs/pkgdown.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer */ 2 | 3 | /** 4 | * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ 5 | * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css 6 | * 7 | * .Site -> body > .container 8 | * .Site-content -> body > .container .row 9 | * .footer -> footer 10 | * 11 | * Key idea seems to be to ensure that .container and __all its parents__ 12 | * have height set to 100% 13 | * 14 | */ 15 | 16 | html, body { 17 | height: 100%; 18 | } 19 | 20 | body { 21 | position: relative; 22 | } 23 | 24 | body > .container { 25 | display: flex; 26 | height: 100%; 27 | flex-direction: column; 28 | } 29 | 30 | body > .container .row { 31 | flex: 1 0 auto; 32 | } 33 | 34 | footer { 35 | margin-top: 45px; 36 | padding: 35px 0 36px; 37 | border-top: 1px solid #e5e5e5; 38 | color: #666; 39 | display: flex; 40 | flex-shrink: 0; 41 | } 42 | footer p { 43 | margin-bottom: 0; 44 | } 45 | footer div { 46 | flex: 1; 47 | } 48 | footer .pkgdown { 49 | text-align: right; 50 | } 51 | footer p { 52 | margin-bottom: 0; 53 | } 54 | 55 | img.icon { 56 | float: right; 57 | } 58 | 59 | img { 60 | max-width: 100%; 61 | } 62 | 63 | /* Fix bug in bootstrap (only seen in firefox) */ 64 | summary { 65 | display: list-item; 66 | } 67 | 68 | /* Typographic tweaking ---------------------------------*/ 69 | 70 | .contents .page-header { 71 | margin-top: calc(-60px + 1em); 72 | } 73 | 74 | dd { 75 | margin-left: 3em; 76 | } 77 | 78 | /* Section anchors ---------------------------------*/ 79 | 80 | a.anchor { 81 | margin-left: -30px; 82 | display:inline-block; 83 | width: 30px; 84 | height: 30px; 85 | visibility: hidden; 86 | 87 | background-image: url(./link.svg); 88 | background-repeat: no-repeat; 89 | background-size: 20px 20px; 90 | background-position: center center; 91 | } 92 | 93 | .hasAnchor:hover a.anchor { 94 | visibility: visible; 95 | } 96 | 97 | @media (max-width: 767px) { 98 | .hasAnchor:hover a.anchor { 99 | visibility: hidden; 100 | } 101 | } 102 | 103 | 104 | /* Fixes for fixed navbar --------------------------*/ 105 | 106 | .contents h1, .contents h2, .contents h3, .contents h4 { 107 | padding-top: 60px; 108 | margin-top: -40px; 109 | } 110 | 111 | /* Navbar submenu --------------------------*/ 112 | 113 | .dropdown-submenu { 114 | position: relative; 115 | } 116 | 117 | .dropdown-submenu>.dropdown-menu { 118 | top: 0; 119 | left: 100%; 120 | margin-top: -6px; 121 | margin-left: -1px; 122 | border-radius: 0 6px 6px 6px; 123 | } 124 | 125 | .dropdown-submenu:hover>.dropdown-menu { 126 | display: block; 127 | } 128 | 129 | .dropdown-submenu>a:after { 130 | display: block; 131 | content: " "; 132 | float: right; 133 | width: 0; 134 | height: 0; 135 | border-color: transparent; 136 | border-style: solid; 137 | border-width: 5px 0 5px 5px; 138 | border-left-color: #cccccc; 139 | margin-top: 5px; 140 | margin-right: -10px; 141 | } 142 | 143 | .dropdown-submenu:hover>a:after { 144 | border-left-color: #ffffff; 145 | } 146 | 147 | .dropdown-submenu.pull-left { 148 | float: none; 149 | } 150 | 151 | .dropdown-submenu.pull-left>.dropdown-menu { 152 | left: -100%; 153 | margin-left: 10px; 154 | border-radius: 6px 0 6px 6px; 155 | } 156 | 157 | /* Sidebar --------------------------*/ 158 | 159 | #pkgdown-sidebar { 160 | margin-top: 30px; 161 | position: -webkit-sticky; 162 | position: sticky; 163 | top: 70px; 164 | } 165 | 166 | #pkgdown-sidebar h2 { 167 | font-size: 1.5em; 168 | margin-top: 1em; 169 | } 170 | 171 | #pkgdown-sidebar h2:first-child { 172 | margin-top: 0; 173 | } 174 | 175 | #pkgdown-sidebar .list-unstyled li { 176 | margin-bottom: 0.5em; 177 | } 178 | 179 | /* bootstrap-toc tweaks ------------------------------------------------------*/ 180 | 181 | /* All levels of nav */ 182 | 183 | nav[data-toggle='toc'] .nav > li > a { 184 | padding: 4px 20px 4px 6px; 185 | font-size: 1.5rem; 186 | font-weight: 400; 187 | color: inherit; 188 | } 189 | 190 | nav[data-toggle='toc'] .nav > li > a:hover, 191 | nav[data-toggle='toc'] .nav > li > a:focus { 192 | padding-left: 5px; 193 | color: inherit; 194 | border-left: 1px solid #878787; 195 | } 196 | 197 | nav[data-toggle='toc'] .nav > .active > a, 198 | nav[data-toggle='toc'] .nav > .active:hover > a, 199 | nav[data-toggle='toc'] .nav > .active:focus > a { 200 | padding-left: 5px; 201 | font-size: 1.5rem; 202 | font-weight: 400; 203 | color: inherit; 204 | border-left: 2px solid #878787; 205 | } 206 | 207 | /* Nav: second level (shown on .active) */ 208 | 209 | nav[data-toggle='toc'] .nav .nav { 210 | display: none; /* Hide by default, but at >768px, show it */ 211 | padding-bottom: 10px; 212 | } 213 | 214 | nav[data-toggle='toc'] .nav .nav > li > a { 215 | padding-left: 16px; 216 | font-size: 1.35rem; 217 | } 218 | 219 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 220 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 221 | padding-left: 15px; 222 | } 223 | 224 | nav[data-toggle='toc'] .nav .nav > .active > a, 225 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 226 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 227 | padding-left: 15px; 228 | font-weight: 500; 229 | font-size: 1.35rem; 230 | } 231 | 232 | /* orcid ------------------------------------------------------------------- */ 233 | 234 | .orcid { 235 | font-size: 16px; 236 | color: #A6CE39; 237 | /* margins are required by official ORCID trademark and display guidelines */ 238 | margin-left:4px; 239 | margin-right:4px; 240 | vertical-align: middle; 241 | } 242 | 243 | /* Reference index & topics ----------------------------------------------- */ 244 | 245 | .ref-index th {font-weight: normal;} 246 | 247 | .ref-index td {vertical-align: top;} 248 | .ref-index .icon {width: 40px;} 249 | .ref-index .alias {width: 40%;} 250 | .ref-index-icons .alias {width: calc(40% - 40px);} 251 | .ref-index .title {width: 60%;} 252 | 253 | .ref-arguments th {text-align: right; padding-right: 10px;} 254 | .ref-arguments th, .ref-arguments td {vertical-align: top;} 255 | .ref-arguments .name {width: 20%;} 256 | .ref-arguments .desc {width: 80%;} 257 | 258 | /* Nice scrolling for wide elements --------------------------------------- */ 259 | 260 | table { 261 | display: block; 262 | overflow: auto; 263 | } 264 | 265 | /* Syntax highlighting ---------------------------------------------------- */ 266 | 267 | pre { 268 | word-wrap: normal; 269 | word-break: normal; 270 | border: 1px solid #eee; 271 | } 272 | 273 | pre, code { 274 | background-color: #f8f8f8; 275 | color: #333; 276 | } 277 | 278 | pre code { 279 | overflow: auto; 280 | word-wrap: normal; 281 | white-space: pre; 282 | } 283 | 284 | pre .img { 285 | margin: 5px 0; 286 | } 287 | 288 | pre .img img { 289 | background-color: #fff; 290 | display: block; 291 | height: auto; 292 | } 293 | 294 | code a, pre a { 295 | color: #375f84; 296 | } 297 | 298 | a.sourceLine:hover { 299 | text-decoration: none; 300 | } 301 | 302 | .fl {color: #1514b5;} 303 | .fu {color: #000000;} /* function */ 304 | .ch,.st {color: #036a07;} /* string */ 305 | .kw {color: #264D66;} /* keyword */ 306 | .co {color: #888888;} /* comment */ 307 | 308 | .message { color: black; font-weight: bolder;} 309 | .error { color: orange; font-weight: bolder;} 310 | .warning { color: #6A0366; font-weight: bolder;} 311 | 312 | /* Clipboard --------------------------*/ 313 | 314 | .hasCopyButton { 315 | position: relative; 316 | } 317 | 318 | .btn-copy-ex { 319 | position: absolute; 320 | right: 0; 321 | top: 0; 322 | visibility: hidden; 323 | } 324 | 325 | .hasCopyButton:hover button.btn-copy-ex { 326 | visibility: visible; 327 | } 328 | 329 | /* headroom.js ------------------------ */ 330 | 331 | .headroom { 332 | will-change: transform; 333 | transition: transform 200ms linear; 334 | } 335 | .headroom--pinned { 336 | transform: translateY(0%); 337 | } 338 | .headroom--unpinned { 339 | transform: translateY(-100%); 340 | } 341 | 342 | /* mark.js ----------------------------*/ 343 | 344 | mark { 345 | background-color: rgba(255, 255, 51, 0.5); 346 | border-bottom: 2px solid rgba(255, 153, 51, 0.3); 347 | padding: 1px; 348 | } 349 | 350 | /* vertical spacing after htmlwidgets */ 351 | .html-widget { 352 | margin-bottom: 10px; 353 | } 354 | 355 | /* fontawesome ------------------------ */ 356 | 357 | .fab { 358 | font-family: "Font Awesome 5 Brands" !important; 359 | } 360 | 361 | /* don't display links in code chunks when printing */ 362 | /* source: https://stackoverflow.com/a/10781533 */ 363 | @media print { 364 | code a:link:after, code a:visited:after { 365 | content: ""; 366 | } 367 | } 368 | -------------------------------------------------------------------------------- /docs/pkgdown.js: -------------------------------------------------------------------------------- 1 | /* http://gregfranko.com/blog/jquery-best-practices/ */ 2 | (function($) { 3 | $(function() { 4 | 5 | $('.navbar-fixed-top').headroom(); 6 | 7 | $('body').css('padding-top', $('.navbar').height() + 10); 8 | $(window).resize(function(){ 9 | $('body').css('padding-top', $('.navbar').height() + 10); 10 | }); 11 | 12 | $('[data-toggle="tooltip"]').tooltip(); 13 | 14 | var cur_path = paths(location.pathname); 15 | var links = $("#navbar ul li a"); 16 | var max_length = -1; 17 | var pos = -1; 18 | for (var i = 0; i < links.length; i++) { 19 | if (links[i].getAttribute("href") === "#") 20 | continue; 21 | // Ignore external links 22 | if (links[i].host !== location.host) 23 | continue; 24 | 25 | var nav_path = paths(links[i].pathname); 26 | 27 | var length = prefix_length(nav_path, cur_path); 28 | if (length > max_length) { 29 | max_length = length; 30 | pos = i; 31 | } 32 | } 33 | 34 | // Add class to parent
  • , and enclosing
  • if in dropdown 35 | if (pos >= 0) { 36 | var menu_anchor = $(links[pos]); 37 | menu_anchor.parent().addClass("active"); 38 | menu_anchor.closest("li.dropdown").addClass("active"); 39 | } 40 | }); 41 | 42 | function paths(pathname) { 43 | var pieces = pathname.split("/"); 44 | pieces.shift(); // always starts with / 45 | 46 | var end = pieces[pieces.length - 1]; 47 | if (end === "index.html" || end === "") 48 | pieces.pop(); 49 | return(pieces); 50 | } 51 | 52 | // Returns -1 if not found 53 | function prefix_length(needle, haystack) { 54 | if (needle.length > haystack.length) 55 | return(-1); 56 | 57 | // Special case for length-0 haystack, since for loop won't run 58 | if (haystack.length === 0) { 59 | return(needle.length === 0 ? 0 : -1); 60 | } 61 | 62 | for (var i = 0; i < haystack.length; i++) { 63 | if (needle[i] != haystack[i]) 64 | return(i); 65 | } 66 | 67 | return(haystack.length); 68 | } 69 | 70 | /* Clipboard --------------------------*/ 71 | 72 | function changeTooltipMessage(element, msg) { 73 | var tooltipOriginalTitle=element.getAttribute('data-original-title'); 74 | element.setAttribute('data-original-title', msg); 75 | $(element).tooltip('show'); 76 | element.setAttribute('data-original-title', tooltipOriginalTitle); 77 | } 78 | 79 | if(ClipboardJS.isSupported()) { 80 | $(document).ready(function() { 81 | var copyButton = ""; 82 | 83 | $(".examples, div.sourceCode").addClass("hasCopyButton"); 84 | 85 | // Insert copy buttons: 86 | $(copyButton).prependTo(".hasCopyButton"); 87 | 88 | // Initialize tooltips: 89 | $('.btn-copy-ex').tooltip({container: 'body'}); 90 | 91 | // Initialize clipboard: 92 | var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { 93 | text: function(trigger) { 94 | return trigger.parentNode.textContent; 95 | } 96 | }); 97 | 98 | clipboardBtnCopies.on('success', function(e) { 99 | changeTooltipMessage(e.trigger, 'Copied!'); 100 | e.clearSelection(); 101 | }); 102 | 103 | clipboardBtnCopies.on('error', function() { 104 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); 105 | }); 106 | }); 107 | } 108 | })(window.jQuery || window.$) 109 | -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: 2.9.1.1 2 | pkgdown: 1.5.1 3 | pkgdown_sha: ~ 4 | articles: 5 | recs: recs.html 6 | vertical: vertical.html 7 | last_built: 2020-09-11T12:40Z 8 | urls: 9 | reference: https://crumplab.github.io/vertical/reference 10 | article: https://crumplab.github.io/vertical/articles 11 | 12 | -------------------------------------------------------------------------------- /docs/reference/build_vertical.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Build vertical project — build_vertical • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Build the website associated with a vertical project. This is mostly a wrapper to pkgdown::build_site(), but extended to render .Rmd content from other folders.

    163 |
    164 | 165 |
    build_vertical(clean = TRUE, ...)
    166 | 167 |

    Arguments

    168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 |
    clean

    logical, when clean=TRUE (the default), the docs folder is cleaned (e.g., completely wiped) using pkgdown::clean_site(), otherwise when clean=FALSE clean_site() will not be run.

    ...

    params, pass additional parameters to pkgdown::build_site(...)

    179 | 180 |

    Usage

    181 | 182 | 183 |
    build_vertical()
    184 | 185 | 186 |
    187 | 192 |
    193 | 194 | 195 |
    196 | 199 | 200 |
    201 |

    Site built with pkgdown 1.5.1.

    202 |
    203 | 204 |
    205 |
    206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /docs/reference/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/reference/figures/logo.png -------------------------------------------------------------------------------- /docs/reference/figures/vertical-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/reference/figures/vertical-project.png -------------------------------------------------------------------------------- /docs/reference/figures/vertical-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/reference/figures/vertical-website.png -------------------------------------------------------------------------------- /docs/reference/figures/vertical-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/docs/reference/figures/vertical-workflow.png -------------------------------------------------------------------------------- /docs/reference/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Function reference • vertical 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 | 65 | 66 | 67 | 68 | 69 | 76 | 77 | 78 | 79 | 80 | 81 |
    82 |
    83 | 147 | 148 | 149 | 150 |
    151 | 152 |
    153 |
    154 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 183 | 184 | 185 | 186 | 189 | 190 | 191 | 192 | 195 | 196 | 197 | 198 | 201 | 202 | 203 | 204 | 207 | 208 | 209 | 210 | 213 | 214 | 215 | 216 | 219 | 220 | 221 | 222 | 225 | 226 | 227 | 228 | 231 | 232 | 233 | 234 |
    169 |

    All functions

    170 |

    171 |
    181 |

    build_vertical()

    182 |

    Build vertical project

    187 |

    init_jspsych()

    188 |

    Initialize jsPsych experiment

    193 |

    init_jspsychr()

    194 |

    Initialize jspsychr experiment

    199 |

    init_papaja()

    200 |

    Initialize manuscript

    205 |

    init_poster()

    206 |

    Initialize posters

    211 |

    init_slides()

    212 |

    Initialize slides

    217 |

    init_som()

    218 |

    Initialize supplemental materials

    223 |

    suggest_yml()

    224 |

    Suggest yml for _pkgdown.yml

    229 |

    vertical_project()

    230 |

    Initialize a vertical project

    235 |
    236 | 237 | 242 |
    243 | 244 | 245 |
    246 | 249 | 250 |
    251 |

    Site built with pkgdown 1.5.1.

    252 |
    253 | 254 |
    255 |
    256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | -------------------------------------------------------------------------------- /docs/reference/init_jspsych.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Initialize jsPsych experiment — init_jspsych • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Initialize a jsPsych experiment in the experiments folder of a vertical project

    163 |
    164 | 165 |
    init_jspsych()
    166 | 167 | 168 |

    Details

    169 | 170 |

    This function does the following:

      171 |
    1. creates the experiments folder

    2. 172 |
    3. Downloads the most recent `jspsych`` library from https://github.com/jspsych/jsPsych/releases

    4. 173 |
    5. Adds a minimal jspsych`` example experiment to experiments/experiment-1/`

    6. 174 |
    175 | 176 |

    See the jspsych documentation for more information about using jspsych to build behavioral experiments for the web.

    177 | 178 |
    179 | 184 |
    185 | 186 | 187 |
    188 | 191 | 192 |
    193 |

    Site built with pkgdown 1.5.1.

    194 |
    195 | 196 |
    197 |
    198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /docs/reference/init_jspsychr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Initialize jspsychr experiment — init_jspsychr • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Initialize a jspsychr template in the experiments folder of a vertical project

    163 |
    164 | 165 |
    init_jspsychr()
    166 | 167 | 168 |

    Details

    169 | 170 |

    This function does the following:

      171 |
    1. creates the experiments folder

    2. 172 |
    3. Adds a jspsychr template (Experiment_1), which is an example of using R Studio and R Markdown to author a jspsych experiment

    4. 173 |
    174 | 175 |

    See the jspsych documentation for more information about using jspsych to build behavioral experiments for the web.

    176 |

    See the jspsychr documentation for more information about using R Markdown to write jspsych experiments.

    177 | 178 |
    179 | 184 |
    185 | 186 | 187 |
    188 | 191 | 192 |
    193 |

    Site built with pkgdown 1.5.1.

    194 |
    195 | 196 |
    197 |
    198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /docs/reference/init_papaja.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Initialize manuscript — init_papaja • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Initialize papaja R Markdown APA manuscript in the manuscript folder.

    163 |
    164 | 165 |
    init_papaja()
    166 | 167 | 168 |

    Details

    169 | 170 |

    Run this function to add a papaja manuscript component to a vertical project at a later time (assuming it wasn't created by vertical_project() or init_vertical_project() during initialization.)

    171 |

    See the papaja documentation for more information.

    172 | 173 |
    174 | 179 |
    180 | 181 | 182 |
    183 | 186 | 187 |
    188 |

    Site built with pkgdown 1.5.1.

    189 |
    190 | 191 |
    192 |
    193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /docs/reference/init_poster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Initialize posters — init_poster • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Initialize R Markdown posterdown template in posters folder of a vertical project

    163 |
    164 | 165 |
    init_poster()
    166 | 167 | 168 |

    Details

    169 | 170 |

    Run on initialization, and can be run from the console to include a posters folder and poster template at a later time. See the posterdown documentation for more information. Note that vertical loads one of the three possible posterdown templates.

    171 | 172 |
    173 | 178 |
    179 | 180 | 181 |
    182 | 185 | 186 |
    187 |

    Site built with pkgdown 1.5.1.

    188 |
    189 | 190 |
    191 |
    192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /docs/reference/init_slides.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Initialize slides — init_slides • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Initialize slidy R Markdown template in slides folder of a vertical project

    163 |
    164 | 165 |
    init_slides()
    166 | 167 | 168 |

    Details

    169 | 170 |

    Run on initialization, and can be run from the console to include a slides folder and slidy template at a later time. See the slidy documentation for additional information. There are other R markdown slide templates not suggested by vertical, but that are very good alternatives (e.g., xaringan). Simply add your template of choice to the slides folder.

    171 | 172 |
    173 | 178 |
    179 | 180 | 181 |
    182 | 185 | 186 |
    187 |

    Site built with pkgdown 1.5.1.

    188 |
    189 | 190 |
    191 |
    192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /docs/reference/init_som.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Initialize supplemental materials — init_som • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Initialize R Markdown SOM in the vignettes of a vertical project.

    163 |
    164 | 165 |
    init_som()
    166 | 167 | 168 |

    Details

    169 | 170 |

    A wrapper to usethis for creating a vignettes folder, and adding an example .Rmd. This function is used during vertical project creation. Once a vertical project is established, we suggest a usethis approach to adding articles to vignettes. The usethis approach creates a new .Rmd in vignettes, you define the name and title, and the new file is opened for editing.

    usethis::use_article(name, title = name)
    171 | usethis::use_article("Supplementary_2", title = "Blah blah blah")
    172 | 173 |

    See usethis documentation for more information.

    174 | 175 |
    176 | 181 |
    182 | 183 | 184 |
    185 | 188 | 189 |
    190 |

    Site built with pkgdown 1.5.1.

    191 |
    192 | 193 |
    194 |
    195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /docs/reference/suggest_yml.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Suggest yml for _pkgdown.yml — suggest_yml • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    Run vertical::suggest_yml to generate a suggestions for populating _pkgdown.yml. The suggested yml is written to the console. Copy this to _pkgdown.yml and modify as necessary.

    163 |
    164 | 165 |
    suggest_yml()
    166 | 167 | 168 |

    Value

    169 | 170 |

    yml copied to console

    171 |

    Details

    172 | 173 |

    _pkgdown.yml can be further modified by hand to achieve various customizations to the website. See the pkgdown documentation for additional information.

    174 | 175 |
    176 | 181 |
    182 | 183 | 184 |
    185 | 188 | 189 |
    190 |

    Site built with pkgdown 1.5.1.

    191 |
    192 | 193 |
    194 |
    195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /docs/reference/vertical_project.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Initialize a <strong>vertical</strong> project — vertical_project • vertical 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 | 66 | 67 | 68 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 |
    83 |
    84 | 148 | 149 | 150 | 151 |
    152 | 153 |
    154 |
    155 | 160 | 161 |
    162 |

    This function is called when a vertical R project is created.

    163 |
    164 | 165 |
    vertical_project(
    166 |   path = NULL,
    167 |   init_git = TRUE,
    168 |   init_data = TRUE,
    169 |   init_ms = TRUE,
    170 |   init_som = TRUE,
    171 |   init_slides = TRUE,
    172 |   init_poster = TRUE,
    173 |   init_exp = FALSE,
    174 |   ...
    175 | )
    176 | 177 |

    Arguments

    178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 |
    path

    Name (and location) of package. Must be a valid R package name.

    init_git

    Initialize a git repository? (TRUE)

    init_data

    Initialize data? (TRUE)

    init_ms

    Initialize APA6 manuscript R Markdown template? (TRUE)

    init_som

    Initialize supplementary materials R Markdown template? (TRUE)

    init_slides

    Initialize an R Markdown slide template? (TRUE)

    init_poster

    Initialize an R Markdown poster template? (TRUE)

    init_exp

    Initialize a jsPsych experiment template? (FALSE)

    ...

    Not used.

    217 | 218 | 219 |
    220 | 225 |
    226 | 227 | 228 |
    229 | 232 | 233 |
    234 |

    Site built with pkgdown 1.5.1.

    235 |
    236 | 237 |
    238 |
    239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /docs/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://crumplab.github.io/vertical/index.html 5 | 6 | 7 | https://crumplab.github.io/vertical/reference/build_vertical.html 8 | 9 | 10 | https://crumplab.github.io/vertical/reference/init_jspsych.html 11 | 12 | 13 | https://crumplab.github.io/vertical/reference/init_jspsychr.html 14 | 15 | 16 | https://crumplab.github.io/vertical/reference/init_papaja.html 17 | 18 | 19 | https://crumplab.github.io/vertical/reference/init_poster.html 20 | 21 | 22 | https://crumplab.github.io/vertical/reference/init_slides.html 23 | 24 | 25 | https://crumplab.github.io/vertical/reference/init_som.html 26 | 27 | 28 | https://crumplab.github.io/vertical/reference/suggest_yml.html 29 | 30 | 31 | https://crumplab.github.io/vertical/reference/vertical_project.html 32 | 33 | 34 | https://crumplab.github.io/vertical/articles/recs.html 35 | 36 | 37 | https://crumplab.github.io/vertical/articles/vertical.html 38 | 39 | 40 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/slidy/skeleton/skeleton.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Example slide presentation using slidy" 3 | subtitle: "A place for a subtitle" 4 | author: "Matthew Crump" 5 | date: "10/31/2019" 6 | output: 7 | slidy_presentation: 8 | self_contained: true 9 | theme: yeti 10 | incremental: true 11 | --- 12 | 13 | ```{r setup, include=FALSE} 14 | knitr::opts_chunk$set(echo = FALSE) 15 | ``` 16 | 17 | ## Example slidy presentation {.middle .center} 18 | 19 | Check out the documentation on slidy for more info 20 | 21 | - Note that this slide deck has some custom CSS controlling the styling and look and feel. This can be customized further by editing the style.css file. 22 | 23 | ## A slide with a header {.bigger} 24 | 25 | ## A slide with a header {.bigger} 26 | 27 | And some text in it. 28 | 29 | ## A slide with a header and bullet points {.bigger} 30 | 31 | - bullet 1 32 | - bullet 2 33 | - bullet 3 34 | 35 | ## Something in the middle{.middle .center} 36 | 37 | ## Slide with a picture 38 | 39 | ```{r, echo = FALSE, out.width="50%", fig.align="center"} 40 | plot(pressure$temperature, pressure$pressure) 41 | ``` 42 | 43 | ## The end {.middle .center} 44 | 45 | - don't forget there are other R markdown options for slide decks 46 | - eg., xaringan, and ioslides, and probably a few others 47 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/slidy/template.yaml: -------------------------------------------------------------------------------- 1 | name: Slidy presentation 2 | description: > 3 | Slidy presentation 4 | create_dir: false 5 | -------------------------------------------------------------------------------- /inst/rstudio/addins.dcf: -------------------------------------------------------------------------------- 1 | Name: Build vertical 2 | Description: Build your project into docs/ 3 | Binding: build_vertical 4 | Interactive: true 5 | -------------------------------------------------------------------------------- /inst/rstudio/templates/project/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/inst/rstudio/templates/project/logo.png -------------------------------------------------------------------------------- /inst/rstudio/templates/project/vertical_project.dcf: -------------------------------------------------------------------------------- 1 | Title: Vertical Research Project 2 | Binding: vertical_project 3 | Subtitle: Create a vertical research project 4 | Caption: Create a vertical research project 5 | Icon: logo.png 6 | OpenFiles: README.md 7 | 8 | Parameter: init_git 9 | Widget: CheckboxInput 10 | Label: Create a git repository 11 | Default: On 12 | Position: left 13 | 14 | Parameter: init_data 15 | Widget: CheckboxInput 16 | Label: Initialize directory for raw data 17 | Default: On 18 | Position: left 19 | 20 | Parameter: init_ms 21 | Widget: CheckboxInput 22 | Label: Initialize manuscript (papaja) 23 | Default: On 24 | Position: left 25 | 26 | Parameter: init_som 27 | Widget: CheckboxInput 28 | Label: Initialize supplemental materials 29 | Default: On 30 | Position: left 31 | 32 | Parameter: init_slides 33 | Widget: CheckboxInput 34 | Label: Initialize slides (slidy) 35 | Default: On 36 | Position: right 37 | 38 | Parameter: init_poster 39 | Widget: CheckboxInput 40 | Label: Initialize poster (posterdown) 41 | Default: On 42 | Position: right 43 | 44 | Parameter: init_exp 45 | Widget: CheckboxInput 46 | Label: Initialize experiments (jspsych) 47 | Default: Off 48 | Position: right 49 | -------------------------------------------------------------------------------- /inst/templates/_pkgdown.yml: -------------------------------------------------------------------------------- 1 | # see https://pkgdown.r-lib.org/articles/pkgdown.html for yml help 2 | 3 | navbar: 4 | structure: 5 | left: 6 | - home 7 | - manuscript 8 | - articles 9 | - slides 10 | - posters 11 | - experiments 12 | - reference 13 | right: github 14 | components: 15 | home: 16 | icon: fa-home fa-lg 17 | href: index.html 18 | manuscript: 19 | text: Manuscript 20 | menu: 21 | - text: APA6 PDF 22 | href: manuscript/manuscript.pdf 23 | articles: 24 | text: Supplementary 25 | menu: 26 | - text: Supplementary 27 | href: articles/som.html 28 | slides: 29 | text: Slides 30 | menu: 31 | - text: R Markdown slides 32 | href: slides/slides.html 33 | posters: 34 | text: Posters 35 | menu: 36 | - text: Conference 2019 37 | href: posters/poster.html 38 | reference: 39 | text: Functions 40 | href: reference/index.html 41 | github: 42 | text: source code 43 | icon: fa-lg fa-github 44 | href: https://github.com/user/repo 45 | 46 | home: 47 | strip_header: true 48 | links: 49 | - text: A link to X 50 | href: some link 51 | Authors: 52 | - text: Author 1 53 | 54 | -------------------------------------------------------------------------------- /inst/templates/data.R: -------------------------------------------------------------------------------- 1 | #' @title A dataset 2 | #' @description Example data frame 3 | #' @format A data.frame with . rows and . variables: 4 | #' \describe{ 5 | #' \item{\code{a}}{Variable a; integer.} 6 | #' \item{\code{b}}{Variable b; factor with 2 levels (x, y).} 7 | #'} 8 | #' @details This dataset is an example. 9 | "{{{dataname}}}" 10 | -------------------------------------------------------------------------------- /inst/templates/experiment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My experiment 5 | 6 | 7 | 8 | 9 | 10 | 22 | 23 | -------------------------------------------------------------------------------- /inst/templates/preprocess.R: -------------------------------------------------------------------------------- 1 | ## Example data preprocessing script 2 | 3 | # Load data 4 | mydata <- data.frame(a = 1, b = 2) 5 | 6 | # Processing ... 7 | 8 | usethis::use_data(mydata) 9 | -------------------------------------------------------------------------------- /inst/vertical/_pkgdown.yml: -------------------------------------------------------------------------------- 1 | pkgdown: 2 | as_is: true 3 | 4 | navbar: 5 | structure: 6 | left: 7 | - home 8 | - manuscript 9 | - articles 10 | - slides 11 | - posters 12 | - experiments 13 | - reference 14 | right: github 15 | components: 16 | home: 17 | icon: fa-home fa-lg 18 | href: index.html 19 | manuscript: 20 | text: Manuscript 21 | menu: 22 | - text: APA6 PDF 23 | href: manuscript/manuscript.pdf 24 | articles: 25 | text: Supplementary 26 | menu: 27 | - text: Getting Started 28 | href: articles/Supplemental_1.html 29 | slides: 30 | text: Slides 31 | menu: 32 | - text: R Markdown slides 33 | href: slides/slides.html 34 | posters: 35 | text: Posters 36 | menu: 37 | - text: Conference 2019 38 | href: posters/poster.html 39 | experiments: 40 | text: Experiments 41 | menu: 42 | - text: Experiment 1 43 | href: experiments/experiment-1/index.html 44 | reference: 45 | text: Functions 46 | href: reference/index.html 47 | github: 48 | text: source code 49 | icon: fa-lg fa-github 50 | href: https://github.com/CrumpLab/vertical_template 51 | 52 | home: 53 | strip_header: true 54 | links: 55 | - text: A link to X 56 | href: some link 57 | - text: A link to Y 58 | href: another link 59 | Authors: 60 | - text: Author 1 61 | - text: Author 2 62 | 63 | -------------------------------------------------------------------------------- /inst/vertical/experiment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My experiment 5 | 6 | 7 | 8 | 9 | 10 | 22 | 23 | -------------------------------------------------------------------------------- /man/build_vertical.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/build.R 3 | \name{build_vertical} 4 | \alias{build_vertical} 5 | \title{Build vertical project} 6 | \usage{ 7 | build_vertical(clean = TRUE, ...) 8 | } 9 | \arguments{ 10 | \item{clean}{logical, when clean=TRUE (the default), the \code{docs} folder is cleaned (e.g., completely wiped) using \code{pkgdown::clean_site()}, otherwise when clean=FALSE \code{clean_site()} will not be run.} 11 | 12 | \item{...}{params, pass additional parameters to \code{pkgdown::build_site(...)}} 13 | } 14 | \description{ 15 | Build the website associated with a vertical project. This is mostly a wrapper to \code{pkgdown::build_site()}, but extended to render .Rmd content from other folders. 16 | } 17 | \section{Usage}{ 18 | \preformatted{build_vertical() 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /man/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/man/figures/logo.png -------------------------------------------------------------------------------- /man/figures/vertical-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/man/figures/vertical-project.png -------------------------------------------------------------------------------- /man/figures/vertical-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/man/figures/vertical-website.png -------------------------------------------------------------------------------- /man/figures/vertical-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/man/figures/vertical-workflow.png -------------------------------------------------------------------------------- /man/init_jspsych.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/initialize.R 3 | \name{init_jspsych} 4 | \alias{init_jspsych} 5 | \title{Initialize jsPsych experiment} 6 | \usage{ 7 | init_jspsych() 8 | } 9 | \description{ 10 | Initialize a jsPsych experiment in the \code{experiments} folder of a vertical project 11 | } 12 | \details{ 13 | This function does the following: 14 | \enumerate{ 15 | \item creates the \code{experiments} folder 16 | \item Downloads the most recent `jspsych`` library from \url{https://github.com/jspsych/jsPsych/releases} 17 | \item Adds a minimal \verb{jspsych`` example experiment to }experiments/experiment-1/` 18 | } 19 | 20 | See the \href{https://www.jspsych.org}{jspsych documentation} for more information about using jspsych to build behavioral experiments for the web. 21 | } 22 | -------------------------------------------------------------------------------- /man/init_jspsychr.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/initialize.R 3 | \name{init_jspsychr} 4 | \alias{init_jspsychr} 5 | \title{Initialize jspsychr experiment} 6 | \usage{ 7 | init_jspsychr() 8 | } 9 | \description{ 10 | Initialize a jspsychr template in the \code{experiments} folder of a vertical project 11 | } 12 | \details{ 13 | This function does the following: 14 | \enumerate{ 15 | \item creates the \code{experiments} folder 16 | \item Adds a \code{jspsychr} template (Experiment_1), which is an example of using R Studio and R Markdown to author a \code{jspsych} experiment 17 | } 18 | 19 | See the \href{https://www.jspsych.org}{jspsych documentation} for more information about using jspsych to build behavioral experiments for the web. 20 | 21 | See the \href{https://crumplab.github.io/jspsychr/}{jspsychr documentation} for more information about using R Markdown to write \code{jspsych} experiments. 22 | } 23 | -------------------------------------------------------------------------------- /man/init_papaja.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/initialize.R 3 | \name{init_papaja} 4 | \alias{init_papaja} 5 | \title{Initialize manuscript} 6 | \usage{ 7 | init_papaja() 8 | } 9 | \description{ 10 | Initialize \code{papaja} R Markdown APA manuscript in the \code{manuscript} folder. 11 | } 12 | \details{ 13 | Run this function to add a \code{papaja} manuscript component to a vertical project at a later time (assuming it wasn't created by \code{vertical_project()} or \code{init_vertical_project()} during initialization.) 14 | 15 | See the \href{https://crsh.github.io/papaja_man/}{papaja documentation} for more information. 16 | } 17 | -------------------------------------------------------------------------------- /man/init_poster.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/initialize.R 3 | \name{init_poster} 4 | \alias{init_poster} 5 | \title{Initialize posters} 6 | \usage{ 7 | init_poster() 8 | } 9 | \description{ 10 | Initialize R Markdown \code{posterdown} template in \code{posters} folder of a vertical project 11 | } 12 | \details{ 13 | Run on initialization, and can be run from the console to include a posters folder and poster template at a later time. See the \href{https://github.com/brentthorne/posterdown}{posterdown documentation} for more information. Note that \code{vertical} loads one of the three possible \code{posterdown} templates. 14 | } 15 | -------------------------------------------------------------------------------- /man/init_slides.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/initialize.R 3 | \name{init_slides} 4 | \alias{init_slides} 5 | \title{Initialize slides} 6 | \usage{ 7 | init_slides() 8 | } 9 | \description{ 10 | Initialize slidy R Markdown template in slides folder of a vertical project 11 | } 12 | \details{ 13 | Run on initialization, and can be run from the console to include a slides folder and slidy template at a later time. See the \href{https://bookdown.org/yihui/rmarkdown/slidy-presentation.html}{slidy documentation} for additional information. There are other R markdown slide templates not suggested by vertical, but that are very good alternatives (e.g., \code{xaringan}). Simply add your template of choice to the slides folder. 14 | } 15 | -------------------------------------------------------------------------------- /man/init_som.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/initialize.R 3 | \name{init_som} 4 | \alias{init_som} 5 | \title{Initialize supplemental materials} 6 | \usage{ 7 | init_som() 8 | } 9 | \description{ 10 | Initialize R Markdown SOM in the \code{vignettes} of a vertical project. 11 | } 12 | \details{ 13 | A wrapper to \code{usethis} for creating a \code{vignettes} folder, and adding an example .Rmd. This function is used during vertical project creation. Once a vertical project is established, we suggest a \code{usethis} approach to adding articles to vignettes. The \code{usethis} approach creates a new .Rmd in \code{vignettes}, you define the name and title, and the new file is opened for editing.\preformatted{usethis::use_article(name, title = name) 14 | usethis::use_article("Supplementary_2", title = "Blah blah blah") 15 | } 16 | 17 | See \href{https://usethis.r-lib.org/reference/use_vignette.html}{usethis documentation} for more information. 18 | } 19 | -------------------------------------------------------------------------------- /man/suggest_yml.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/maintain.R 3 | \name{suggest_yml} 4 | \alias{suggest_yml} 5 | \title{Suggest yml for _pkgdown.yml} 6 | \usage{ 7 | suggest_yml() 8 | } 9 | \value{ 10 | yml copied to console 11 | } 12 | \description{ 13 | Run \code{vertical::suggest_yml} to generate a suggestions for populating \verb{_pkgdown.yml}. The suggested yml is written to the console. Copy this to \verb{_pkgdown.yml} and modify as necessary. 14 | } 15 | \details{ 16 | \verb{_pkgdown.yml} can be further modified by hand to achieve various customizations to the website. See the \href{https://pkgdown.r-lib.org/reference/build_site.html}{pkgdown documentation} for additional information. 17 | } 18 | -------------------------------------------------------------------------------- /man/vertical_project.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/initialize.R 3 | \name{vertical_project} 4 | \alias{vertical_project} 5 | \title{Initialize a \strong{vertical} project} 6 | \usage{ 7 | vertical_project( 8 | path = NULL, 9 | init_git = TRUE, 10 | init_data = TRUE, 11 | init_ms = TRUE, 12 | init_som = TRUE, 13 | init_slides = TRUE, 14 | init_poster = TRUE, 15 | init_exp = FALSE, 16 | ... 17 | ) 18 | } 19 | \arguments{ 20 | \item{path}{Name (and location) of package. Must be a valid R package name.} 21 | 22 | \item{init_git}{Initialize a git repository? (TRUE)} 23 | 24 | \item{init_data}{Initialize data? (TRUE)} 25 | 26 | \item{init_ms}{Initialize APA6 manuscript R Markdown template? (TRUE)} 27 | 28 | \item{init_som}{Initialize supplementary materials R Markdown template? (TRUE)} 29 | 30 | \item{init_slides}{Initialize an R Markdown slide template? (TRUE)} 31 | 32 | \item{init_poster}{Initialize an R Markdown poster template? (TRUE)} 33 | 34 | \item{init_exp}{Initialize a jsPsych experiment template? (FALSE)} 35 | 36 | \item{...}{Not used.} 37 | } 38 | \description{ 39 | This function is called when a \strong{vertical} R project is created. 40 | } 41 | -------------------------------------------------------------------------------- /manuscript/images/build-install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/build-install.png -------------------------------------------------------------------------------- /manuscript/images/build-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/build-tools.png -------------------------------------------------------------------------------- /manuscript/images/empty-package-folders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/empty-package-folders.png -------------------------------------------------------------------------------- /manuscript/images/exampleData-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/exampleData-help.png -------------------------------------------------------------------------------- /manuscript/images/knit-readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/knit-readme.png -------------------------------------------------------------------------------- /manuscript/images/r-package-skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/r-package-skeleton.png -------------------------------------------------------------------------------- /manuscript/images/rstudio-create-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/rstudio-create-project.png -------------------------------------------------------------------------------- /manuscript/images/vertical-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/vertical-project.png -------------------------------------------------------------------------------- /manuscript/images/vertical-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/vertical-website.png -------------------------------------------------------------------------------- /manuscript/images/vertical-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/manuscript/images/vertical-workflow.png -------------------------------------------------------------------------------- /manuscript/r-references.bib: -------------------------------------------------------------------------------- 1 | @Manual{R-base, 2 | title = {R: A Language and Environment for Statistical Computing}, 3 | author = {{R Core Team}}, 4 | organization = {R Foundation for Statistical Computing}, 5 | address = {Vienna, Austria}, 6 | year = {2020}, 7 | url = {https://www.R-project.org/}, 8 | } 9 | @Manual{R-citr, 10 | title = {citr: 'RStudio' Add-in to Insert Markdown Citations}, 11 | author = {Frederik Aust}, 12 | year = {2019}, 13 | note = {R package version 0.3.2}, 14 | url = {https://CRAN.R-project.org/package=citr}, 15 | } 16 | @Manual{R-devtools, 17 | title = {devtools: Tools to Make Developing R Packages Easier}, 18 | author = {Hadley Wickham and Jim Hester and Winston Chang}, 19 | year = {2020}, 20 | note = {R package version 2.3.0}, 21 | url = {https://CRAN.R-project.org/package=devtools}, 22 | } 23 | @Manual{R-jspsychr, 24 | title = {jspsychr: Templates and functions for writing and running jspsych 25 | experiments from R-studio}, 26 | author = {Matthew J. C. Crump}, 27 | year = {2019}, 28 | note = {R package version 0.0.1.0000}, 29 | url = {https://github.com/CrumpLab/jspsychr}, 30 | } 31 | @Book{R-knitr, 32 | title = {Dynamic Documents with {R} and knitr}, 33 | author = {Yihui Xie}, 34 | publisher = {Chapman and Hall/CRC}, 35 | address = {Boca Raton, Florida}, 36 | year = {2015}, 37 | edition = {2nd}, 38 | note = {ISBN 978-1498716963}, 39 | url = {https://yihui.org/knitr/}, 40 | } 41 | @Manual{R-papaja, 42 | author = {Frederik Aust and Marius Barth}, 43 | title = {{papaja}: {Create} {APA} manuscripts with {R Markdown}}, 44 | year = {2020}, 45 | note = {R package version 0.1.0.9942}, 46 | url = {https://github.com/crsh/papaja}, 47 | } 48 | @Manual{R-pkgdown, 49 | title = {pkgdown: Make Static HTML Documentation for a Package}, 50 | author = {Hadley Wickham and Jay Hesselberth}, 51 | year = {2020}, 52 | note = {R package version 1.5.1}, 53 | url = {https://CRAN.R-project.org/package=pkgdown}, 54 | } 55 | @Manual{R-posterdown, 56 | title = {posterdown: An R Package Built to Generate Reproducible Conference Posters for the Academic and Professional World Where Powerpoint and Pages Just Won't Cut It}, 57 | author = {W. Brent Thorne}, 58 | year = {2019}, 59 | url = {https://github.com/brentthorne/posterdown}, 60 | note = {R package version 1.0}, 61 | } 62 | @Manual{R-rio, 63 | title = {rio: A Swiss-army knife for data file I/O}, 64 | author = {Chung-hong Chan and Geoffrey CH Chan and Thomas J. Leeper and Jason Becker}, 65 | year = {2018}, 66 | note = {R package version 0.5.16}, 67 | } 68 | @Book{R-rmarkdown, 69 | title = {R Markdown: The Definitive Guide}, 70 | author = {Yihui Xie and J.J. Allaire and Garrett Grolemund}, 71 | publisher = {Chapman and Hall/CRC}, 72 | address = {Boca Raton, Florida}, 73 | year = {2018}, 74 | note = {ISBN 9781138359338}, 75 | url = {https://bookdown.org/yihui/rmarkdown}, 76 | } 77 | @Manual{R-roxygen2, 78 | title = {roxygen2: In-Line Documentation for R}, 79 | author = {Hadley Wickham and Peter Danenberg and Gábor Csárdi and Manuel Eugster}, 80 | year = {2020}, 81 | note = {R package version 7.1.0}, 82 | url = {https://CRAN.R-project.org/package=roxygen2}, 83 | } 84 | @Article{R-testthat, 85 | author = {Hadley Wickham}, 86 | title = {testthat: Get Started with Testing}, 87 | journal = {The R Journal}, 88 | year = {2011}, 89 | volume = {3}, 90 | pages = {5--10}, 91 | url = {https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf}, 92 | } 93 | @Manual{R-usethis, 94 | title = {usethis: Automate Package and Project Setup}, 95 | author = {Hadley Wickham and Jennifer Bryan}, 96 | year = {2020}, 97 | note = {R package version 1.6.1}, 98 | url = {https://CRAN.R-project.org/package=usethis}, 99 | } 100 | @Manual{R-vertical, 101 | title = {vertical: Reproducible worfklow for psychological science research asset 102 | creation and communication}, 103 | author = {Matthew J. C. Crump and Matti Vuorre}, 104 | year = {2020}, 105 | note = {R package version 0.0.1.0000}, 106 | url = {https://github.com/CrumpLab/vertical}, 107 | } 108 | -------------------------------------------------------------------------------- /pkgdown/extra.css: -------------------------------------------------------------------------------- 1 | .nav-stacked>li>a { 2 | position: relative; 3 | display: block; 4 | padding: 2px 15px; 5 | } 6 | -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/pkgdown/favicon/favicon.ico -------------------------------------------------------------------------------- /vertical.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | PackageRoxygenize: rd,collate,namespace,vignette 22 | -------------------------------------------------------------------------------- /vignettes/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.R 3 | -------------------------------------------------------------------------------- /vignettes/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/logo.png -------------------------------------------------------------------------------- /vignettes/imgs/new-rd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/new-rd.png -------------------------------------------------------------------------------- /vignettes/imgs/package-build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/package-build.png -------------------------------------------------------------------------------- /vignettes/imgs/pkgdown-build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/pkgdown-build.png -------------------------------------------------------------------------------- /vignettes/imgs/r-package-skeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/r-package-skeleton.png -------------------------------------------------------------------------------- /vignettes/imgs/roxygen-insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/roxygen-insert.png -------------------------------------------------------------------------------- /vignettes/imgs/roxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/roxygen.png -------------------------------------------------------------------------------- /vignettes/imgs/vertical-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/vertical-new.png -------------------------------------------------------------------------------- /vignettes/imgs/vertical-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/vertical-project.png -------------------------------------------------------------------------------- /vignettes/imgs/vertical-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/vertical-structure.png -------------------------------------------------------------------------------- /vignettes/imgs/vertical-website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/vertical-website.png -------------------------------------------------------------------------------- /vignettes/imgs/vertical-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/vertical-workflow.png -------------------------------------------------------------------------------- /vignettes/imgs/vignettes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/vertical/099b6cc4867903321f40dfedb2cfee8a2d07f4d1/vignettes/imgs/vignettes.png -------------------------------------------------------------------------------- /vignettes/recs.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Suggested R Packages" 3 | --- 4 | 5 | ```{r, include = FALSE} 6 | knitr::opts_chunk$set( 7 | collapse = TRUE, 8 | comment = "#>" 9 | ) 10 | ``` 11 | 12 | **vertical** currently suggests a limited number of R packages and templates useful for psychological research projects. This suggestion list keeps track of the current suggestions and lists useful alternatives. 13 | 14 | ## R Packages 15 | 16 | **vertical** suggestions 17 | 18 | - [pkgdown](https://pkgdown.r-lib.org) | compile R package as website 19 | - [devtools](https://devtools.r-lib.org) | automate aspects of R Package creation while being consistent with R Package standards 20 | - [usethis](https://usethis.r-lib.org) | automate aspects of R Package creation while being consistent with R Package standards 21 | - [roxygen2](https://roxygen2.r-lib.org) | convenient documentation syntax 22 | 23 | Consider also: 24 | 25 | - [sinew](https://github.com/metrumresearchgroup/sinew) | automate roxygen comments for function and data documentation 26 | 27 | --- 28 | 29 | ## Writing Papers 30 | 31 | **vertical** suggests 32 | 33 | - [papaja](https://crsh.github.io/papaja_man/) | write APA papers in R Markdown 34 | 35 | Consider also: 36 | 37 | - [rticles](https://github.com/rstudio/rticles) | numerous R markdown templates for many journal types 38 | 39 | --- 40 | 41 | ## Posters 42 | 43 | **vertical** suggests 44 | 45 | - [posterdown](https://github.com/brentthorne/posterdown) | write posters in R Markdown 46 | 47 | Consider also: 48 | 49 | - [pagedown](https://github.com/rstudio/pagedown) 50 | 51 | --- 52 | 53 | ## Slides 54 | 55 | **vertical** suggests 56 | 57 | - [slidy](https://bookdown.org/yihui/rmarkdown/slidy-presentation.html) | write slide presentations in R Markdown 58 | 59 | Consider also: 60 | 61 | - [xaringan](https://github.com/yihui/xaringan) 62 | - [ioslides](https://bookdown.org/yihui/rmarkdown/ioslides-presentation.html) 63 | - [beamer](https://bookdown.org/yihui/rmarkdown/beamer-presentation.html) 64 | 65 | --- 66 | 67 | ## Experiments 68 | 69 | **vertical** suggests 70 | 71 | - [jspysch](https://www.jspsych.org) | javascript library for behavioral experiments 72 | - [jspsychr](https://crumplab.github.io/jspsychr/) | use RStudio and R markdown/Javascipt to write jspcyh experiments 73 | 74 | Consider also: 75 | 76 | - [psychtestr](https://github.com/pmcharrison/psychTestR) 77 | - [xprmntr](https://github.com/djnavarro/xprmntr) 78 | - [jaysire](https://github.com/djnavarro/jaysire) 79 | -------------------------------------------------------------------------------- /vignettes/tutorial.bib: -------------------------------------------------------------------------------- 1 | @Book{xie2018, 2 | title = {R Markdown: The Definitive Guide}, 3 | author = {Yihui Xie and J.J. Allaire and Garrett Grolemund}, 4 | publisher = {Chapman and Hall/CRC}, 5 | address = {Boca Raton, Florida}, 6 | year = {2018}, 7 | note = {ISBN 9781138359338}, 8 | url = {https://bookdown.org/yihui/rmarkdown}, 9 | } 10 | 11 | @Manual{usethis, 12 | title = {usethis: Automate Package and Project Setup}, 13 | author = {Hadley Wickham and Jennifer Bryan}, 14 | year = {2019}, 15 | note = {R package version 1.5.0}, 16 | url = {https://CRAN.R-project.org/package=usethis}, 17 | } 18 | 19 | @Manual{pkgdown, 20 | title = {pkgdown: Make Static HTML Documentation for a Package}, 21 | author = {Hadley Wickham and Jay Hesselberth}, 22 | year = {2019}, 23 | note = {R package version 1.4.1}, 24 | url = {https://CRAN.R-project.org/package=pkgdown}, 25 | } 26 | 27 | @Manual{devtools, 28 | title = {devtools: Tools to Make Developing R Packages Easier}, 29 | author = {Hadley Wickham and Jim Hester and Winston Chang}, 30 | year = {2019}, 31 | note = {R package version 2.0.2}, 32 | url = {https://CRAN.R-project.org/package=devtools}, 33 | } 34 | 35 | @Book{wickham_r_2015, 36 | title = {R {{Packages}}: {{Organize}}, {{Test}}, {{Document}}, and {{Share Your Code}}}, 37 | isbn = {978-1-4919-1054-2}, 38 | url = {http://r-pkgs.had.co.nz/}, 39 | shorttitle = {R {{Packages}}}, 40 | pagetotal = {275}, 41 | timestamp = {2017-07-26T20:32:39Z}, 42 | langid = {english}, 43 | publisher = {{"O'Reilly Media, Inc."}}, 44 | author = {Hadley Wickham}, 45 | date = {2015-03-26}, 46 | note = {00061 47 | Google-Books-ID: eqOxBwAAQBAJ}, 48 | keywords = {Computers / Data Processing,Computers / Mathematical & Statistical Software,Computers / Programming Languages / General}, 49 | } 50 | 51 | @Manual{papaja, 52 | author = {Frederik Aust and Marius Barth}, 53 | title = {{papaja}: {Create} {APA} manuscripts with {R Markdown}}, 54 | year = {2018}, 55 | note = {R package version 0.1.0.9842}, 56 | url = {https://github.com/crsh/papaja}, 57 | } 58 | 59 | @Manual{posterdown, 60 | title = {posterdown: An R Package Built to Generate Reproducible Conference Posters for the Academic and Professional World Where Powerpoint and Pages Just Won't Cut It}, 61 | author = {W. Brent Thorne}, 62 | year = {2019}, 63 | url = {https://github.com/brentthorne/posterdown}, 64 | note = {R package version 1.0}, 65 | } 66 | 67 | @article{de2015jspsych, 68 | title={jsPsych: A JavaScript library for creating behavioral experiments in a Web browser}, 69 | author={De Leeuw, Joshua R}, 70 | journal={Behavior research methods}, 71 | volume={47}, 72 | number={1}, 73 | pages={1--12}, 74 | year={2015}, 75 | publisher={Springer} 76 | } 77 | 78 | --------------------------------------------------------------------------------