From a620b617f189103997f626e2fe14be659fb102e5 Mon Sep 17 00:00:00 2001 From: Gregor Gorjanc Date: Fri, 27 Feb 2026 17:07:44 +0000 Subject: [PATCH] Fixing vignette not found Fixes #85 --- README.md | 9 +++++++-- RcppTskit/R/RcppTskit-package.R | 2 +- RcppTskit/vignettes/RcppTskit_intro.qmd | 13 ++++++------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7f93659..db62a43 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ To install the published release from [CRAN](https://cran.r-project.org) use: # https://github.com/HighlanderLab/RcppTskit/issues/14 # https://github.com/HighlanderLab/RcppTskit/issues/45 # install.packages("RcppTskit") +# vignette("RcppTskit_intro") ``` To install the latest development version (possibly unstable!) from @@ -99,10 +100,14 @@ https://mac.r-project.org/tools for macOS tools. # remotes::install_github("HighlanderLab/RcppTskit/RcppTskit") # Main branch -remotes::install_github("HighlanderLab/RcppTskit/RcppTskit@main") +remotes::install_github("HighlanderLab/RcppTskit/RcppTskit@main", + build_vignettes=TRUE) # Development branch -remotes::install_github("HighlanderLab/RcppTskit/RcppTskit@devel") +remotes::install_github("HighlanderLab/RcppTskit/RcppTskit@devel", + build_vignettes=TRUE) + +vignette("RcppTskit_intro") ``` ## Development diff --git a/RcppTskit/R/RcppTskit-package.R b/RcppTskit/R/RcppTskit-package.R index d3d4a17..d89f5c2 100644 --- a/RcppTskit/R/RcppTskit-package.R +++ b/RcppTskit/R/RcppTskit-package.R @@ -24,7 +24,7 @@ #' @importFrom reticulate import is_py_object py_module_available py_require #' #' @examples -#' vignette(package="RcppTskit") +#' vignette(package="RcppTskit_intro") "_PACKAGE" #' Provide an inline plugin so we can call the tskit C API with functions like diff --git a/RcppTskit/vignettes/RcppTskit_intro.qmd b/RcppTskit/vignettes/RcppTskit_intro.qmd index 2fd159b..1870fa7 100644 --- a/RcppTskit/vignettes/RcppTskit_intro.qmd +++ b/RcppTskit/vignettes/RcppTskit_intro.qmd @@ -141,21 +141,20 @@ to record a tree sequence in a multi-generation simulation with many individuals Given the current tree sequence ecosystem, the aims of the `RcppTskit` package are to provide an easy-to-install R package -that supports users in four typical cases. +that supports users in four typical cases of working with tree sequences +and table collection. The authors are open to expanding this scope of `RcppTskit` depending on user demand and engagement. The four typical cases are: -1. Load a tree sequence[^ts_and_tc_note] into R and summarise it, +1. Load a tree sequence into R and summarise it, -2. Pass a tree sequence[^ts_and_tc_note] between R and reticulate or standard Python, +2. Pass a tree sequence between R and reticulate or standard Python, 3. Call the `tskit` C API from C++ in an R session or script, and 4. Call the `tskit` C API from C++ in another R package. -[^ts_and_tc_note]: Both tree sequence and table collection types are supported. - Examples for all of these cases are provided below after we describe the implemented data and class model. @@ -213,7 +212,7 @@ if (!test) { } ``` -### 1) Load a tree sequence[^ts_and_tc_note] into R and summarise it +### 1) Load a tree sequence into R and summarise it ```{r} #| label: use_case_1 @@ -239,7 +238,7 @@ ts2 <- tc$tree_sequence() help(package = "RcppTskit") ``` -### 2) Pass a tree sequence[^ts_and_tc_note] between R and reticulate or standard Python +### 2) Pass a tree sequence between R and reticulate or standard Python ```{r} #| label: use_case_2