Awesome
<!-- README.md is generated from README.Rmd. Please edit that file -->notestar-demo
<!-- badges: start --> <!-- badges: end -->An example analysis notebook created with notestar. The notebook can be previewed here.
Steps I used to make this demo from scratch.
-
Create a new project in RStudio with git repository.
-
Performed first git commit.
-
usethis::use_readme_rmd()
to start writing down these steps. -
notestar::use_notestar()
,notestar:::use_notestar_makefile()
,notestar::use_notestar_references()
-
Edited
index.Rmd
,_targets.R
andR/functions.R
to create some workflow items, includingdata/sleepstudy.csv
. -
Created some entries and wrote them for the demo.
notestar::notebook_create_page(date = "2021-04-10", slug = "about-demo")
notestar::notebook_create_page(date = "2021-04-11", slug = "data-exploration")
notestar::notebook_create_page(date = "2021-04-12", slug = "models")
-
targets::tar_make()
or the Build (Ctrl+B) shortcut in RStudio along the way. -
notestar::notebook_browse()
to view the notebook.
Iterating on steps 5–10 is the main flow for the notebook. We set up
data and modeling things in _targets
and explore/report them in
notebook entries.
-
Committed files and create repository with
usethis::use_github()
-
Added link to repository to index.Rmd.
-
Copied the
notebook.html
file intodocs/index.html
so that it could be previewed with Github Pages.
How the data/modeling flow into the notebook entries and into the final notebook:
targets::tar_visnetwork(targets_only = TRUE)
#> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
#> ✓ ggplot2 3.3.5 ✓ purrr 0.3.4
#> ✓ tibble 3.1.6 ✓ dplyr 1.0.8
#> ✓ tidyr 1.2.0 ✓ stringr 1.4.0
#> ✓ readr 2.1.2 ✓ forcats 0.5.1
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> x dplyr::filter() masks stats::filter()
#> x dplyr::lag() masks stats::lag()
#> Loading required package: Rcpp
#> Loading 'brms' package (version 2.16.3). Useful instructions
#> can be found by typing help('brms'). A more detailed introduction
#> to the package is available through vignette('brms_overview').
#>
#> Attaching package: 'brms'
#>
#> The following object is masked from 'package:stats':
#>
#> ar
#>
<!-- -->