-
Notifications
You must be signed in to change notification settings - Fork 8
v1.6.1 #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.6.1 #313
Changes from all commits
9bc84ca
c0902b3
996e5b7
bb25969
9c3e49a
b87ac6f
6e2aa89
a4156c8
c04ec7e
b1d7979
237ef8b
2f70e63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ | |
| #' @name tutorials | ||
| NULL | ||
|
|
||
| stocnet <- c("manynet", "migraph", "autograph") | ||
| stocnet <- c("manynet", "migraph", "autograph", "netrics") | ||
|
|
||
| #' @rdname tutorials | ||
| #' @export | ||
|
|
@@ -33,12 +33,15 @@ run_tute <- function(tute) { | |
| dplyr::as_tibble(learnr::available_tutorials(package = avail_pkgs[p]), | ||
| silent = TRUE) %>% dplyr::select(1:3) | ||
| }) | ||
| dplyr::bind_rows(tutelist) %>% dplyr::arrange(name) %>% print() | ||
| dplyr::bind_rows(tutelist) %>% | ||
| dplyr::arrange(dplyr::across(dplyr::any_of("name"))) %>% | ||
| print() | ||
| manynet::snet_info("You can run a tutorial by typing e.g `run_tute('tutorial1')` or `run_tute('Data')` into the console.") | ||
| } else { | ||
| try(learnr::run_tutorial(tute, "manynet"), silent = TRUE) | ||
| try(learnr::run_tutorial(tute, "migraph"), silent = TRUE) | ||
| try(learnr::run_tutorial(tute, "autograph"), silent = TRUE) | ||
| try(learnr::run_tutorial(tute, "netrics"), silent = TRUE) | ||
| try(learnr::run_tutorial(tute, "migraph"), silent = TRUE) | ||
|
Comment on lines
41
to
+44
|
||
| manynet::snet_info("Didn't find a direct match, so looking for close matches...") | ||
| tutelist <- lapply(manynet::snet_progress_along(avail_pkgs, | ||
| name = "Checking tutorials in stocnet packages"), function(p){ | ||
|
|
@@ -71,7 +74,9 @@ extract_tute <- function(tute) { | |
| dplyr::as_tibble(learnr::available_tutorials(package = avail_pkgs[p]), | ||
| silent = TRUE) %>% dplyr::select(1:3) | ||
| }) | ||
| dplyr::bind_rows(tutelist) %>% dplyr::arrange(name) %>% print() | ||
| dplyr::bind_rows(tutelist) %>% | ||
| dplyr::arrange(dplyr::across(dplyr::any_of("name"))) %>% | ||
| print() | ||
| manynet::snet_info("You can extract the code from one of these tutorials by typing e.g `extract_tute('tutorial1')` into the console.") | ||
| } else { | ||
| thisRequires("knitr") | ||
|
|
@@ -80,9 +85,13 @@ extract_tute <- function(tute) { | |
| thisRequires("autograph") | ||
| pth <- gsub("manynet", "autograph", pth) | ||
| } | ||
| if(!dir.exists(pth)) { | ||
| thisRequires("netrics") | ||
| pth <- gsub("autograph", "netrics", pth) | ||
| } | ||
| if(!dir.exists(pth)) { | ||
| thisRequires("migraph") | ||
| pth <- gsub("autograph", "migraph", pth) | ||
| pth <- gsub("netrics", "migraph", pth) | ||
| } | ||
| knitr::purl(file.path(pth, list.files(pth, pattern = "*.Rmd")), | ||
| documentation = 1) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.