diff --git a/.Rbuildignore b/.Rbuildignore index cf845c5..a9ac29a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -18,4 +18,6 @@ vignettes/precompile\.R ^Meta$ ^CRAN-SUBMISSION$ ^README\.Rmd$ -^.mailmap$ \ No newline at end of file +^.mailmap$ +^\.positai$ +^\.claude$ diff --git a/.gitignore b/.gitignore index d1b11a3..655a2bb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ inst/tutorials/tutorial5/equivalence_data/* toadd/* .data.csv cache/* +.positai diff --git a/DESCRIPTION b/DESCRIPTION index f36cf78..9748ca1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: netrics Title: Many Ways to Measure and Classify Membership for Networks, Nodes, and Ties -Version: 0.2.2 -Date: 2026-04-24 +Version: 0.2.3 +Date: 2026-04-25 Description: Many tools for calculating network, node, or tie marks, measures, motifs and memberships of many different types of networks. Marks identify structural positions, measures quantify network properties, diff --git a/NEWS.md b/NEWS.md index 00a7dc4..55cc3a1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# netrics 0.2.3 + +## Tutorials + +- Fixed object reference in position tutorial + # netrics 0.2.2 ## Package diff --git a/cran-comments.md b/cran-comments.md index b55f507..064df7a 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -9,6 +9,4 @@ 0 errors | 0 warnings | 0 notes -- While last package submission was only 9 days ago: - - Updates to bring netrics into line with latest version of manynet (> v2.0.0) - - Fixes a reverse dependency issue in cross-package documentation referencing +- Fixed reverse dependency issue diff --git a/inst/tutorials/tutorial5/position.Rmd b/inst/tutorials/tutorial5/position.Rmd index 2d967fd..193bb22 100644 --- a/inst/tutorials/tutorial5/position.Rmd +++ b/inst/tutorials/tutorial5/position.Rmd @@ -48,6 +48,7 @@ learnr::random_phrases_add(language = "en", friends <- to_uniplex(ison_algebra, "friends") social <- to_uniplex(ison_algebra, "social") tasks <- to_uniplex(ison_algebra, "tasks") +alge <- to_named(ison_algebra) ``` @@ -479,7 +480,7 @@ What we are saying here is that we want to partition the nodes into two clusters, no matter how dissimilar they are. ```{r k-discrete, exercise = TRUE, exercise.setup = "varyclust"} -plot(node_in_structural(alge, k = 2)) +plot(node_in_structural(to_named(ison_algebra), k = 2)) ``` But we're really just guessing. Maybe 2 is not the best `k`? @@ -523,8 +524,8 @@ can return a somewhat different result to the elbow method. See what we have here, with all other arguments held the same: ```{r elbowsil, exercise = TRUE, exercise.setup = "varyclust"} -plot(node_in_structural(alge, k = "elbow")) -plot(node_in_structural(alge, k = "silhouette")) +plot(node_in_structural(to_named(ison_algebra), k = "elbow")) +plot(node_in_structural(to_named(ison_algebra), k = "silhouette")) ``` Ok, so it looks like the elbow method returns `k == 3` as a good trade-off @@ -551,7 +552,7 @@ however oftentimes this misses the point in finding clusters of nodes that, despite some variation, can be considered as similar on some dimension. ```{r strict, exercise = TRUE, exercise.setup = "varyclust"} -plot(node_in_structural(alge, k = "strict")) +plot(node_in_structural(to_named(ison_algebra), k = "strict")) ``` Here for example, no two nodes have precisely the same tie-profile, @@ -573,6 +574,7 @@ structurally equivalent classes. We can graph this of course, as above: ```{r strplot, exercise = TRUE, exercise.setup = "varyclust"} +alge <- to_named(ison_algebra) alge %>% mutate(se = node_in_structural(alge)) %>% graphr(node_color = "se") diff --git a/inst/tutorials/tutorial5/position.html b/inst/tutorials/tutorial5/position.html index 8426eef..ba9c0d8 100644 --- a/inst/tutorials/tutorial5/position.html +++ b/inst/tutorials/tutorial5/position.html @@ -533,7 +533,7 @@
plot(node_in_structural(alge, k = 2))
+plot(node_in_structural(to_named(ison_algebra), k = 2))
But we’re really just guessing. Maybe 2 is not the best @@ -571,8 +571,8 @@
plot(node_in_structural(alge, k = "elbow"))
-plot(node_in_structural(alge, k = "silhouette"))
+plot(node_in_structural(to_named(ison_algebra), k = "elbow"))
+plot(node_in_structural(to_named(ison_algebra), k = "silhouette"))
Ok, so it looks like the elbow method returns k == 3 as
@@ -597,7 +597,7 @@
plot(node_in_structural(alge, k = "strict"))
+plot(node_in_structural(to_named(ison_algebra), k = "strict"))
Here for example, no two nodes have precisely the same tie-profile, @@ -620,7 +620,8 @@
alge %>%
+alge <- to_named(ison_algebra)
+alge %>%
mutate(se = node_in_structural(alge)) %>%
graphr(node_color = "se")
@@ -876,6 +877,7 @@ Glossary
friends <- to_uniplex(ison_algebra, "friends")
social <- to_uniplex(ison_algebra, "social")
tasks <- to_uniplex(ison_algebra, "tasks")
+alge <- to_named(ison_algebra)
@@ -1062,29 +1064,29 @@ Glossary
@@ -1163,9 +1165,9 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
chunks = list(list(label = "objects-setup", code = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
opts = list(label = "\"objects-setup\"", purl = "FALSE"),
engine = "r"), list(label = "bridges", code = "sum(tie_is_bridge(friends))\nany(node_by_bridges(friends)>0)",
@@ -1227,9 +1229,9 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
chunks = list(list(label = "objects-setup", code = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
opts = list(label = "\"objects-setup\"", purl = "FALSE"),
engine = "r"), list(label = "constraint", code = "",
@@ -1291,9 +1293,9 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
chunks = list(list(label = "objects-setup", code = "alge <- to_named(ison_algebra)\nfriends <- to_uniplex(alge, \"friends\")\nsocial <- to_uniplex(alge, \"social\")\ntasks <- to_uniplex(alge, \"tasks\")",
opts = list(label = "\"objects-setup\"", purl = "FALSE"),
engine = "r"), list(label = "constraintplot", code = "",
@@ -1332,11 +1334,11 @@ Glossary
@@ -1411,19 +1413,19 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "", chunks = list(list(label = "data", code = "",
- opts = list(label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
- engine = "r"), list(label = "find-se", code = "node_in_structural(ison_algebra)\n\nison_algebra %>% \n mutate(se = node_in_structural(ison_algebra)) %>% \n graphr(node_color = \"se\")",
- opts = list(label = "\"find-se\"", exercise = "TRUE",
- exercise.setup = "\"data\""), engine = "r")), code_check = NULL,
- error_check = NULL, check = NULL, solution = NULL, tests = NULL,
- options = list(eval = FALSE, echo = TRUE, results = "markup",
- tidy = FALSE, tidy.opts = NULL, collapse = FALSE, prompt = FALSE,
- comment = NA, highlight = FALSE, size = "normalsize",
- background = "#F7F7F7", strip.white = TRUE, cache = 0,
- cache.path = "position_cache/html/", cache.vars = NULL,
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "", chunks = list(list(label = "data",
+ code = "", opts = list(label = "\"data\"", exercise = "TRUE",
+ purl = "FALSE"), engine = "r"), list(label = "find-se",
+ code = "node_in_structural(ison_algebra)\n\nison_algebra %>% \n mutate(se = node_in_structural(ison_algebra)) %>% \n graphr(node_color = \"se\")",
+ opts = list(label = "\"find-se\"", exercise = "TRUE", exercise.setup = "\"data\""),
+ engine = "r")), code_check = NULL, error_check = NULL, check = NULL,
+ solution = NULL, tests = NULL, options = list(eval = FALSE,
+ echo = TRUE, results = "markup", tidy = FALSE, tidy.opts = NULL,
+ collapse = FALSE, prompt = FALSE, comment = NA, highlight = FALSE,
+ size = "normalsize", background = "#F7F7F7", strip.white = TRUE,
+ cache = 0, cache.path = "position_cache/html/", cache.vars = NULL,
cache.lazy = TRUE, dependson = NULL, autodep = FALSE,
cache.rebuild = FALSE, fig.keep = "high", fig.show = "asis",
fig.align = "default", fig.path = "position_files/figure-html/",
@@ -1475,13 +1477,13 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "", chunks = list(list(label = "data", code = "",
- opts = list(label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
- engine = "r"), list(label = "construct-cor", code = "",
- opts = list(label = "\"construct-cor\"", exercise = "TRUE",
- exercise.setup = "\"data\"", purl = "FALSE"), engine = "r")),
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "", chunks = list(list(label = "data",
+ code = "", opts = list(label = "\"data\"", exercise = "TRUE",
+ purl = "FALSE"), engine = "r"), list(label = "construct-cor",
+ code = "", opts = list(label = "\"construct-cor\"", exercise = "TRUE",
+ exercise.setup = "\"data\"", purl = "FALSE"), engine = "r")),
code_check = NULL, error_check = NULL, check = NULL, solution = structure(c("node_x_tie(ison_algebra)",
"dim(node_x_tie(ison_algebra))"), chunk_opts = list(label = "construct-cor-solution")),
tests = NULL, options = list(eval = FALSE, echo = TRUE, results = "markup",
@@ -1538,13 +1540,13 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "", chunks = list(list(label = "data", code = "",
- opts = list(label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
- engine = "r"), list(label = "construct-binary", code = "",
- opts = list(label = "\"construct-binary\"", exercise = "TRUE",
- exercise.setup = "\"data\"", purl = "FALSE"), engine = "r")),
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "", chunks = list(list(label = "data",
+ code = "", opts = list(label = "\"data\"", exercise = "TRUE",
+ purl = "FALSE"), engine = "r"), list(label = "construct-binary",
+ code = "", opts = list(label = "\"construct-binary\"", exercise = "TRUE",
+ exercise.setup = "\"data\"", purl = "FALSE"), engine = "r")),
code_check = NULL, error_check = NULL, check = NULL, solution = structure(c("# But it's easier to simplify the network by removing the classification into different types of ties.",
"# Note that this also reduces the total number of possible paths between nodes",
"ison_algebra %>%", " select_ties(-type) %>%", " node_x_tie()"
@@ -1603,19 +1605,19 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "", chunks = list(list(label = "data", code = "",
- opts = list(label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
- engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
- opts = list(label = "\"varyclust\"", exercise = "TRUE",
- exercise.setup = "\"data\""), engine = "r")), code_check = NULL,
- error_check = NULL, check = NULL, solution = NULL, tests = NULL,
- options = list(eval = FALSE, echo = TRUE, results = "markup",
- tidy = FALSE, tidy.opts = NULL, collapse = FALSE, prompt = FALSE,
- comment = NA, highlight = FALSE, size = "normalsize",
- background = "#F7F7F7", strip.white = TRUE, cache = 0,
- cache.path = "position_cache/html/", cache.vars = NULL,
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "", chunks = list(list(label = "data",
+ code = "", opts = list(label = "\"data\"", exercise = "TRUE",
+ purl = "FALSE"), engine = "r"), list(label = "varyclust",
+ code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
+ opts = list(label = "\"varyclust\"", exercise = "TRUE", exercise.setup = "\"data\""),
+ engine = "r")), code_check = NULL, error_check = NULL, check = NULL,
+ solution = NULL, tests = NULL, options = list(eval = FALSE,
+ echo = TRUE, results = "markup", tidy = FALSE, tidy.opts = NULL,
+ collapse = FALSE, prompt = FALSE, comment = NA, highlight = FALSE,
+ size = "normalsize", background = "#F7F7F7", strip.white = TRUE,
+ cache = 0, cache.path = "position_cache/html/", cache.vars = NULL,
cache.lazy = TRUE, dependson = NULL, autodep = FALSE,
cache.rebuild = FALSE, fig.keep = "high", fig.show = "asis",
fig.align = "default", fig.path = "position_files/figure-html/",
@@ -1642,11 +1644,11 @@ Glossary
@@ -1691,15 +1693,15 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
chunks = list(list(label = "data", code = "", opts = list(
label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
opts = list(label = "\"varyclust\"", exercise = "TRUE",
exercise.setup = "\"data\""), engine = "r"), list(
- label = "k-discrete", code = "plot(node_in_structural(alge, k = 2))",
+ label = "k-discrete", code = "plot(node_in_structural(to_named(ison_algebra), k = 2))",
opts = list(label = "\"k-discrete\"", exercise = "TRUE",
exercise.setup = "\"varyclust\""), engine = "r")),
code_check = NULL, error_check = NULL, check = NULL, solution = NULL,
@@ -1720,7 +1722,7 @@ Glossary
message = TRUE, render = NULL, ref.label = NULL, child = NULL,
engine = "r", split = FALSE, include = TRUE, purl = TRUE,
max.print = 1000, label = "k-discrete", exercise = TRUE,
- exercise.setup = "varyclust", code = "plot(node_in_structural(alge, k = 2))",
+ exercise.setup = "varyclust", code = "plot(node_in_structural(to_named(ison_algebra), k = 2))",
out.width.px = 624, out.height.px = 384, params.src = "k-discrete, exercise = TRUE, exercise.setup = \"varyclust\"",
fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"),
engine = "r", version = "4"), class = c("r", "tutorial_exercise"
@@ -1757,15 +1759,15 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
chunks = list(list(label = "data", code = "", opts = list(
label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
opts = list(label = "\"varyclust\"", exercise = "TRUE",
exercise.setup = "\"data\""), engine = "r"), list(
- label = "elbowsil", code = "plot(node_in_structural(alge, k = \"elbow\"))\nplot(node_in_structural(alge, k = \"silhouette\"))",
+ label = "elbowsil", code = "plot(node_in_structural(to_named(ison_algebra), k = \"elbow\"))\nplot(node_in_structural(to_named(ison_algebra), k = \"silhouette\"))",
opts = list(label = "\"elbowsil\"", exercise = "TRUE",
exercise.setup = "\"varyclust\""), engine = "r")),
code_check = NULL, error_check = NULL, check = NULL, solution = NULL,
@@ -1786,9 +1788,9 @@ Glossary
message = TRUE, render = NULL, ref.label = NULL, child = NULL,
engine = "r", split = FALSE, include = TRUE, purl = TRUE,
max.print = 1000, label = "elbowsil", exercise = TRUE,
- exercise.setup = "varyclust", code = c("plot(node_in_structural(alge, k = \"elbow\"))",
- "plot(node_in_structural(alge, k = \"silhouette\"))"),
- out.width.px = 624, out.height.px = 384, params.src = "elbowsil, exercise = TRUE, exercise.setup = \"varyclust\"",
+ exercise.setup = "varyclust", code = c("plot(node_in_structural(to_named(ison_algebra), k = \"elbow\"))",
+ "plot(node_in_structural(to_named(ison_algebra), k = \"silhouette\"))"
+ ), out.width.px = 624, out.height.px = 384, params.src = "elbowsil, exercise = TRUE, exercise.setup = \"varyclust\"",
fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"),
engine = "r", version = "4"), class = c("r", "tutorial_exercise"
)))
@@ -1824,15 +1826,15 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
chunks = list(list(label = "data", code = "", opts = list(
label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
opts = list(label = "\"varyclust\"", exercise = "TRUE",
exercise.setup = "\"data\""), engine = "r"), list(
- label = "strict", code = "plot(node_in_structural(alge, k = \"strict\"))",
+ label = "strict", code = "plot(node_in_structural(to_named(ison_algebra), k = \"strict\"))",
opts = list(label = "\"strict\"", exercise = "TRUE",
exercise.setup = "\"varyclust\""), engine = "r")),
code_check = NULL, error_check = NULL, check = NULL, solution = NULL,
@@ -1853,7 +1855,7 @@ Glossary
message = TRUE, render = NULL, ref.label = NULL, child = NULL,
engine = "r", split = FALSE, include = TRUE, purl = TRUE,
max.print = 1000, label = "strict", exercise = TRUE,
- exercise.setup = "varyclust", code = "plot(node_in_structural(alge, k = \"strict\"))",
+ exercise.setup = "varyclust", code = "plot(node_in_structural(to_named(ison_algebra), k = \"strict\"))",
out.width.px = 624, out.height.px = 384, params.src = "strict, exercise = TRUE, exercise.setup = \"varyclust\"",
fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"),
engine = "r", version = "4"), class = c("r", "tutorial_exercise"
@@ -1890,15 +1892,15 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
chunks = list(list(label = "data", code = "", opts = list(
label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
opts = list(label = "\"varyclust\"", exercise = "TRUE",
exercise.setup = "\"data\""), engine = "r"), list(
- label = "strplot", code = "alge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
+ label = "strplot", code = "alge <- to_named(ison_algebra)\nalge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
opts = list(label = "\"strplot\"", exercise = "TRUE",
exercise.setup = "\"varyclust\""), engine = "r")),
code_check = NULL, error_check = NULL, check = NULL, solution = NULL,
@@ -1919,7 +1921,8 @@ Glossary
message = TRUE, render = NULL, ref.label = NULL, child = NULL,
engine = "r", split = FALSE, include = TRUE, purl = TRUE,
max.print = 1000, label = "strplot", exercise = TRUE,
- exercise.setup = "varyclust", code = c("alge %>% ", " mutate(se = node_in_structural(alge)) %>% ",
+ exercise.setup = "varyclust", code = c("alge <- to_named(ison_algebra)",
+ "alge %>% ", " mutate(se = node_in_structural(alge)) %>% ",
" graphr(node_color = \"se\")"), out.width.px = 624,
out.height.px = 384, params.src = "strplot, exercise = TRUE, exercise.setup = \"varyclust\"",
fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"),
@@ -1957,15 +1960,15 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))\nalge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))\nalge <- to_named(ison_algebra)\nalge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
chunks = list(list(label = "data", code = "", opts = list(
label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
opts = list(label = "\"varyclust\"", exercise = "TRUE",
exercise.setup = "\"data\""), engine = "r"), list(
- label = "strplot", code = "alge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
+ label = "strplot", code = "alge <- to_named(ison_algebra)\nalge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
opts = list(label = "\"strplot\"", exercise = "TRUE",
exercise.setup = "\"varyclust\""), engine = "r"),
list(label = "summ", code = "", opts = list(label = "\"summ\"",
@@ -2026,15 +2029,15 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))\nalge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))\nalge <- to_named(ison_algebra)\nalge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
chunks = list(list(label = "data", code = "", opts = list(
label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
opts = list(label = "\"varyclust\"", exercise = "TRUE",
exercise.setup = "\"data\""), engine = "r"), list(
- label = "strplot", code = "alge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
+ label = "strplot", code = "alge <- to_named(ison_algebra)\nalge %>% \n mutate(se = node_in_structural(alge)) %>% \n graphr(node_color = \"se\")",
opts = list(label = "\"strplot\"", exercise = "TRUE",
exercise.setup = "\"varyclust\""), engine = "r"),
list(label = "block", code = "", opts = list(label = "\"block\"",
@@ -2100,9 +2103,9 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = "\nalge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
chunks = list(list(label = "data", code = "", opts = list(
label = "\"data\"", exercise = "TRUE", purl = "FALSE"),
engine = "r"), list(label = "varyclust", code = "alge <- to_named(ison_algebra) # fake names to make comparison clearer\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"euclidean\"))\n\n# changing the type of distance used\nplot(node_in_structural(alge, cluster = \"hier\", distance = \"manhattan\"))\n\n# changing the clustering algorithm\nplot(node_in_structural(alge, cluster = \"concor\", distance = \"euclidean\"))",
@@ -2168,19 +2171,19 @@ Glossary
" \"Beau travail!\",", " \"Bravo!\",",
" \"Super!\"),", " encouragement = c(\"Bon effort\"))",
"friends <- to_uniplex(ison_algebra, \"friends\")", "social <- to_uniplex(ison_algebra, \"social\")",
-"tasks <- to_uniplex(ison_algebra, \"tasks\")"), chunk_opts = list(
- label = "setup", include = FALSE, purl = FALSE, eval = TRUE)),
- setup = NULL, chunks = list(list(label = "freeplay", code = "",
- opts = list(label = "\"freeplay\"", exercise = "TRUE"),
- engine = "r")), code_check = NULL, error_check = NULL,
- check = NULL, solution = NULL, tests = NULL, options = list(
- eval = FALSE, echo = TRUE, results = "markup", tidy = FALSE,
- tidy.opts = NULL, collapse = FALSE, prompt = FALSE, comment = NA,
- highlight = FALSE, size = "normalsize", background = "#F7F7F7",
- strip.white = TRUE, cache = 0, cache.path = "position_cache/html/",
- cache.vars = NULL, cache.lazy = TRUE, dependson = NULL,
- autodep = FALSE, cache.rebuild = FALSE, fig.keep = "high",
- fig.show = "asis", fig.align = "default", fig.path = "position_files/figure-html/",
+"tasks <- to_uniplex(ison_algebra, \"tasks\")", "alge <- to_named(ison_algebra)"
+), chunk_opts = list(label = "setup", include = FALSE, purl = FALSE,
+ eval = TRUE)), setup = NULL, chunks = list(list(label = "freeplay",
+ code = "", opts = list(label = "\"freeplay\"", exercise = "TRUE"),
+ engine = "r")), code_check = NULL, error_check = NULL, check = NULL,
+ solution = NULL, tests = NULL, options = list(eval = FALSE,
+ echo = TRUE, results = "markup", tidy = FALSE, tidy.opts = NULL,
+ collapse = FALSE, prompt = FALSE, comment = NA, highlight = FALSE,
+ size = "normalsize", background = "#F7F7F7", strip.white = TRUE,
+ cache = 0, cache.path = "position_cache/html/", cache.vars = NULL,
+ cache.lazy = TRUE, dependson = NULL, autodep = FALSE,
+ cache.rebuild = FALSE, fig.keep = "high", fig.show = "asis",
+ fig.align = "default", fig.path = "position_files/figure-html/",
dev = "png", dev.args = NULL, dpi = 192, fig.ext = "png",
fig.width = 6.5, fig.height = 4, fig.env = "figure",
fig.cap = NULL, fig.scap = NULL, fig.lp = "fig:", fig.subcap = NULL,
@@ -2203,7 +2206,7 @@ Glossary