Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
^docs$
^pkgdown$
^README.html$
^extras$
^extras$
^vignettes/articles$
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ Suggests:
Config/testthat/edition: 3
URL: https://mi-erasmusmc.github.io/studyGenerics/
VignetteBuilder: knitr
Config/Needs/website: rmarkdown
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: ~
url: https://mi-erasmusmc.github.io/studyGenerics/
template:
bootstrap: 5

2 changes: 2 additions & 0 deletions vignettes/articles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.quarto/
**/*.quarto_ipynb
File renamed without changes.
50 changes: 50 additions & 0 deletions vignettes/articles/new_study_package.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "Inserting a New Package Structure"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

## Create an empty project

First, create a new empty project for your new study package with the package use this or from the menu in RStudio (Menu > File > New Project). The package will open a new instance of Positron or Rstudio.

```{r, eval=FALSE}
library(usethis)

usethis::create_package(
path = "~/P1C1001"
)

```

## Initiate an environment

Inside the new study package use `renv` to initialise a new environment to start installing packages and install `studyGenerics`

```{r, eval=FALSE}
library(renv)

renv::init()

renv::install("mi-erasmusmc/studyGenerics")

```

## Insert the structure

Finally, use the function `studyGenerics::insertStructure` to create a common configuration of packages and files to start developing a study package. You can use the parameter `n_obj` to define the number of objectives in your study. This will create a file to write a script for each objective in the /R folder.

```{r, eval=FALSE}
library(studyGenerics)

studyGenerics::insertStructure(
path = ".", # Default to create the study structure in the package you are currently in
n_obj = 3 # Default 3, in number.
)

```
Loading
Loading