Skip to content

Commit 016ff51

Browse files
Query section on pkgdown
1 parent 2666689 commit 016ff51

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

R/queries.R

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#' @returns A logical value indicating whether the object is a `caugi_graph`.
1818
#'
1919
#' @family queries
20+
#' @concept queries
2021
#'
2122
#' @export
2223
is_caugi <- function(x, throw_error = FALSE) {
@@ -37,6 +38,7 @@ is_caugi <- function(x, throw_error = FALSE) {
3738
#' @returns A logical value indicating whether the graph is empty.
3839
#'
3940
#' @family queries
41+
#' @concept queries
4042
#'
4143
#' @export
4244
is_empty_caugi <- function(cg) {
@@ -56,6 +58,7 @@ is_empty_caugi <- function(cg) {
5658
#' @returns A logical indicating if the two graphs have the same nodes.
5759
#'
5860
#' @family queries
61+
#' @concept queries
5962
#'
6063
#' @export
6164
same_nodes <- function(cg1, cg2, throw_error = FALSE) {
@@ -108,6 +111,7 @@ same_nodes <- function(cg1, cg2, throw_error = FALSE) {
108111
#' @returns A logical value indicating whether the graph is acyclic.
109112
#'
110113
#' @family queries
114+
#' @concept queries
111115
#'
112116
#' @export
113117
is_acyclic <- function(cg, force_check = FALSE) {
@@ -137,6 +141,7 @@ is_acyclic <- function(cg, force_check = FALSE) {
137141
#' @returns A logical value indicating whether the graph is a DAG.
138142
#'
139143
#' @family queries
144+
#' @concept queries
140145
#'
141146
#' @export
142147
is_dag <- function(cg, force_check = FALSE) {
@@ -164,6 +169,7 @@ is_dag <- function(cg, force_check = FALSE) {
164169
#' @returns A logical value indicating whether the graph is a PDAG.
165170
#'
166171
#' @family queries
172+
#' @concept queries
167173
#'
168174
#' @export
169175
is_pdag <- function(cg, force_check = FALSE) {
@@ -190,6 +196,7 @@ is_pdag <- function(cg, force_check = FALSE) {
190196
#'
191197
#' @rdname nodes
192198
#' @family queries
199+
#' @concept queries
193200
#'
194201
#' @export
195202
nodes <- function(cg) {
@@ -211,8 +218,10 @@ V <- nodes # igraph notation
211218
#' @param cg A `caugi_graph` object.
212219
#'
213220
#' @rdname edges
221+
#' @concept queries
214222
#'
215223
#' @family queries
224+
#' @concept queries
216225
#'
217226
#' @export
218227
edges <- function(cg) {
@@ -232,6 +241,7 @@ E <- edges # igraph notation
232241
#' @returns A character vector of edge types.
233242
#'
234243
#' @family queries
244+
#' @concept queries
235245
#'
236246
#' @export
237247
edge_types <- function(cg) {
@@ -258,6 +268,7 @@ edge_types <- function(cg) {
258268
#' requested) or a list of character vectors (if multiple nodes are requested).
259269
#'
260270
#' @family queries
271+
#' @concept queries
261272
#'
262273
#' @export
263274
parents <- function(cg, nodes = NULL, index = NULL) {
@@ -307,6 +318,7 @@ parents <- function(cg, nodes = NULL, index = NULL) {
307318
#' requested) or a list of character vectors (if multiple nodes are requested).
308319
#'
309320
#' @family queries
321+
#' @concept queries
310322
#'
311323
#' @export
312324
children <- function(cg, nodes = NULL, index = NULL) {
@@ -356,6 +368,7 @@ children <- function(cg, nodes = NULL, index = NULL) {
356368
#' requested) or a list of character vectors (if multiple nodes are requested).
357369
#'
358370
#' @family queries
371+
#' @concept queries
359372
#'
360373
#' @export
361374
neighbors <- function(cg, nodes = NULL, index = NULL) {
@@ -409,6 +422,7 @@ neighbours <- neighbors
409422
#' requested) or a list of character vectors (if multiple nodes are requested).
410423
#'
411424
#' @family queries
425+
#' @concept queries
412426
#'
413427
#' @export
414428
ancestors <- function(cg, nodes = NULL, index = NULL) {
@@ -458,6 +472,7 @@ ancestors <- function(cg, nodes = NULL, index = NULL) {
458472
#' requested) or a list of character vectors (if multiple nodes are requested).
459473
#'
460474
#' @family queries
475+
#' @concept queries
461476
#'
462477
#' @export
463478
descendants <- function(cg, nodes = NULL, index = NULL) {
@@ -507,6 +522,7 @@ descendants <- function(cg, nodes = NULL, index = NULL) {
507522
#' requested) or a list of character vectors (if multiple nodes are requested).
508523
#'
509524
#' @family queries
525+
#' @concept queries
510526
#'
511527
#' @export
512528
markov_blanket <- function(cg, nodes = NULL, index = NULL) {
@@ -558,6 +574,7 @@ markov_blanket <- function(cg, nodes = NULL, index = NULL) {
558574
#' requested) or a list of character vectors (if multiple nodes are requested).
559575
#'
560576
#' @family queries
577+
#' @concept queries
561578
#'
562579
#' @export
563580
exogenous <- function(cg, undirected_as_parents = FALSE) {

_pkgdown.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ url: https://frederikfabriciusbjerre.github.io/caugi/
22
template:
33
bootstrap: 5
44

5+
reference:
6+
- title: Queries
7+
contents:
8+
- has_concept("queries")
9+

0 commit comments

Comments
 (0)