Skip to content

Commit 8bbf1e9

Browse files
committed
additional fixes to docs, fix roxygen meta
1 parent 662658e commit 8bbf1e9

File tree

78 files changed

+137
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+137
-265
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tna 0.4.1
22

3-
* The `detailed` argument of `estimate_centrality_stability()` has been implemented. Previously this argument had no effect on the output of the function.
3+
* The `detailed` argument of `estimate_centrality_stability()` has been removed. Previously this argument had no effect on the output of the function.
44
* Removed several duplicated entries in the documentation.
55

66
# tna 0.4.0

R/centralities.R

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@ estimate_centrality_stability <- estimate_cs
204204
#' calculating the CS-coefficient. The default is 0.7.
205205
#' @param certainty A `numeric` value specifying the desired level of certainty
206206
#' for the CS-coefficient. Default is 0.95.
207-
#' @param detailed A `logical` value specifying whether to return detailed
208-
#' sampling results. If `TRUE`, detailed results are included in the output.
209-
#' The default is `FALSE`.
210207
#' @param progressbar A `logical` value. If `TRUE`, a progress bar is displayed
211208
#' Defaults to `FALSE`
212209
#' @param ... Ignored.
@@ -218,8 +215,6 @@ estimate_centrality_stability <- estimate_cs
218215
#' of the measure.
219216
#' * `correlations`: A `matrix` of correlations between the original
220217
#' centrality and the resampled centralities for each drop proportion.
221-
#' * `detailed_results`: A detailed data frame of the sampled correlations,
222-
#' returned only if `return_detailed = TRUE`
223218
#'
224219
#' If `x` is a `group_tna` object, a `group_tna_stability` object is returned
225220
#' instead, which is a `list` of `tna_stability` objects.
@@ -239,14 +234,12 @@ estimate_cs.tna <- function(x, loops = FALSE, normalize = FALSE,
239234
"InStrength", "OutStrength", "Betweenness"
240235
), iter = 1000, method = "pearson",
241236
drop_prop = seq(0.1, 0.9, by = 0.1),
242-
threshold = 0.7,
243-
certainty = 0.95, detailed = FALSE,
237+
threshold = 0.7, certainty = 0.95,
244238
progressbar = FALSE, ...) {
245239
check_tna_seq(x)
246240
check_flag(loops)
247241
check_flag(normalize)
248242
check_flag(progressbar)
249-
check_flag(detailed)
250243
check_values(iter, strict = TRUE)
251244
check_range(threshold)
252245
check_range(certainty)
@@ -429,7 +422,6 @@ wcc <- function(mat) {
429422
# Clusters ----------------------------------------------------------------
430423

431424
#' @export
432-
#' @family clusters
433425
#' @rdname centralities
434426
centralities.group_tna <- function(x, loops = FALSE,
435427
normalize = FALSE, measures, ...) {
@@ -465,15 +457,14 @@ centralities.group_tna <- function(x, loops = FALSE,
465457
}
466458

467459
#' @export
468-
#' @family clusters
469460
#' @rdname estimate_centrality_stability
470461
estimate_cs.group_tna <- function(x, loops = FALSE, normalize = FALSE,
471462
measures = c(
472463
"InStrength", "OutStrength", "Betweenness"
473464
), iter = 1000, method = "pearson",
474465
drop_prop = seq(0.1, 0.9, by = 0.1),
475466
threshold = 0.7, certainty = 0.95,
476-
detailed = FALSE, progressbar = FALSE, ...) {
467+
progressbar = FALSE, ...) {
477468
check_missing(x)
478469
check_class(x, "group_tna")
479470
structure(
@@ -490,7 +481,6 @@ estimate_cs.group_tna <- function(x, loops = FALSE, normalize = FALSE,
490481
drop_prop = drop_prop,
491482
threshold = threshold,
492483
certainty = certainty,
493-
detailed = detailed,
494484
progressbar = progressbar,
495485
...
496486
)
@@ -501,7 +491,6 @@ estimate_cs.group_tna <- function(x, loops = FALSE, normalize = FALSE,
501491
}
502492

503493
#' @export
504-
#' @family clusters
505494
#' @rdname estimate_centrality_stability
506495
estimate_centrality_stability.group_tna <- estimate_cs.group_tna
507496

R/clusters.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Build a grouped Transition Network Analysis Model
1+
#' Build a Grouped Transition Network Analysis Model
22
#'
33
#' This function constructs a transition network analysis (TNA) model for
44
#' each cluster from a given sequence, wide-format dataframe,
@@ -181,7 +181,7 @@ group_ctna <- function(x, ...) {
181181
group_model(x = x, type = "co-occurrence", ...)
182182
}
183183

184-
#' Retrieve statistics from a mixture Markov model (MMM)
184+
#' Retrieve Statistics from a Mixture Markov Model (MMM)
185185
#'
186186
#' @export
187187
#' @family clusters

R/permutation.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Compare Two Networks from Sequence Data Using Permutation Tests
1+
#' Compare Two Networks from Sequence Data using a Permutation Test
22
#'
33
#' This function compares two networks built from sequence data using
44
#' permutation tests. The function builds Markov models for two sequence

R/plot.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ plot.tna_communities <- function(x, colors, method = "spinglass", ...) {
305305
plot(y, colors = map_to_color(x$assignment[[method]], colors), ...)
306306
}
307307

308-
#' Plot the results of comparing two `tna` models or matrices
308+
#' Plot the Comparison of Two TNA Models or Matrices
309309
#'
310310
#' @export
311311
#' @family comparison
@@ -770,7 +770,7 @@ plot_centralities_multiple <- function(x, reorder, ncol,
770770
)
771771
}
772772

773-
#' Plot the difference network between two models
773+
#' Plot the Difference Network Between Two Models
774774
#'
775775
#' Plots the difference network between model `x` and model `y`. The edges are
776776
#' computed from subtracting the two models. The pie chart is the difference in
@@ -1047,7 +1047,7 @@ hist.group_tna <- function(x, ...) {
10471047
invisible(lapply(x, hist.tna, ...))
10481048
}
10491049

1050-
#' Plot a grouped Transition Network Analysis Model
1050+
#' Plot a Grouped Transition Network Analysis Model
10511051
#'
10521052
#' Plots a transition network of each cluster using `qgraph`.
10531053
#'
@@ -1125,7 +1125,7 @@ plot.group_tna_cliques <- function(x, title, ...) {
11251125
)
11261126
}
11271127

1128-
#' Plot Found Communities
1128+
#' Plot Detected Communities
11291129
#'
11301130
#' @export
11311131
#' @family communities
@@ -1216,7 +1216,7 @@ plot_compare.group_tna <- function(x, i = 1L, j = 2L, ...) {
12161216
plot_compare(x = x[[i]], y = x[[j]], ...)
12171217
}
12181218

1219-
#' Plot state frequencies as a mosaic between two groups
1219+
#' Plot State Frequencies as a Mosaic Between Two Groups
12201220
#'
12211221
#' @export
12221222
#' @family basic

R/print.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ print.summary.tna_bootstrap <- function(x, ...) {
3232
NextMethod(generic = "print", object = x, ...)
3333
}
3434

35-
#' Print a `tna` object
35+
#' Print a `tna` Object
3636
#'
3737
#' @export
3838
#' @family basic
@@ -238,7 +238,7 @@ print.tna_cliques <- function(x, n = 6, first = 1,
238238
invisible(x)
239239
}
240240

241-
#' Print a TNA data object
241+
#' Print a TNA Data Object
242242
#'
243243
#' @export
244244
#' @family basic
@@ -376,7 +376,7 @@ print.group_tna_bootstrap <- function(x, ...) {
376376
invisible(x)
377377
}
378378

379-
#' Print the summary of a grouped Transition Network Analysis Model
379+
#' Print a Summary of a Grouped Transition Network Analysis Model
380380
#'
381381
#' @export
382382
#' @family basic
@@ -401,7 +401,7 @@ print.summary.group_tna <- function(x, ...) {
401401
invisible(x)
402402
}
403403

404-
#' Print Bootstrap Summary for a Grouped Transition Network
404+
#' Print a Bootstrap Summary for a Grouped Transition Network Model
405405
#'
406406
#' @export
407407
#' @family validation

R/pruning.R

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Prune a `tna` network based on transition probabilities
1+
#' Prune a Transition Network based on Transition Probabilities
22
#'
33
#' Prunes a network represented by a `tna` object by removing
44
#' edges based on a specified threshold, lowest percent of non-zero edge
@@ -14,7 +14,7 @@ prune <- function(x, ...) {
1414
}
1515

1616

17-
#' Prune a `tna` network based on transition probabilities
17+
#' Prune a Transition Network based on Transition Probabilities
1818
#'
1919
#' Prunes a network represented by a `tna` object by removing
2020
#' edges based on a specified threshold, lowest percent of non-zero edge
@@ -309,12 +309,11 @@ disparity_filter <- function(mat, level) {
309309
sig
310310
}
311311

312-
# Clusters ----------------------------------------------------------------
313312

313+
# Clusters ----------------------------------------------------------------
314314

315315

316316
#' @export
317-
#' @family clusters
318317
#' @rdname prune
319318
prune.group_tna <- function(x, ...) {
320319
check_missing(x)
@@ -329,7 +328,6 @@ prune.group_tna <- function(x, ...) {
329328
}
330329

331330
#' @export
332-
#' @family clusters
333331
#' @rdname pruning_details
334332
pruning_details.group_tna <- function(x, ...) {
335333
check_missing(x)
@@ -345,7 +343,6 @@ pruning_details.group_tna <- function(x, ...) {
345343
}
346344

347345
#' @export
348-
#' @family clusters
349346
#' @rdname deprune
350347
deprune.group_tna <- function(x, ...) {
351348
check_missing(x)
@@ -360,7 +357,6 @@ deprune.group_tna <- function(x, ...) {
360357
}
361358

362359
#' @export
363-
#' @family clusters
364360
#' @rdname reprune
365361
reprune.group_tna <- function(x, ...) {
366362
check_missing(x)

R/tna-package.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' The `tna` package.
1+
#' The `tna` Package.
22
#'
33
#' @name tna-package
44
#' @family basic
@@ -32,7 +32,7 @@
3232
#'
3333
"_PACKAGE"
3434

35-
#' Example data on student engagement
35+
#' Example Data on Student Engagement
3636
#'
3737
#' Students' engagement states (Active / Average / Disengaged)
3838
#' throughout a whole study program. The data was generated synthetically
@@ -45,15 +45,15 @@
4545
#' @format A `stslist` object (sequence data).
4646
"engagement"
4747

48-
#' Example mixed Markov model fitted to the `engagement` data
48+
#' Example Mixed Markov Model Fitted to the `engagement` Data
4949
#'
5050
#' @family datasets
5151
#' @source The data was generated via `mixed_markov_model.R` in
5252
#' <https://github.com/sonsoleslp/tna/tree/main/data-raw/>
5353
#' @format A `mhmm` object.
5454
"engagement_mmm"
5555

56-
#' Example data on group regulation
56+
#' Example Data on Group Regulation
5757
#'
5858
#' Students' regulation during collaborative learning. Students' interactions
5959
#' were coded as: "adapt", "cohesion", "consensus", "coregulate", "discuss",

R/utilities.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ is_tna_centralities <- function(x) {
7070
#' @export
7171
igraph::as.igraph
7272

73-
#' Coerce a `tna` object into an `igraph` object.
73+
#' Coerce a `tna` Object into an `igraph` Object.
7474
#'
7575
#' @export
7676
#' @family helpers
@@ -86,7 +86,7 @@ as.igraph.tna <- function(x, ...) {
8686
)
8787
}
8888

89-
#' Coerce a weight matrix into an `igraph` object.
89+
#' Coerce a Weight Matrix into an `igraph` Object.
9090
#'
9191
#' @export
9292
#' @family helpers
@@ -105,7 +105,7 @@ as.igraph.matrix <- function(x, directed = TRUE, ...) {
105105
)
106106
}
107107

108-
#' Coerce a specific group from a `group_tna` object into an `igraph` object.
108+
#' Coerce a Specific Group from a `group_tna` Object into an `igraph` Object.
109109
#'
110110
#' @export
111111
#' @family helpers

man/as.igraph.group_tna.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)