Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf98f1e7

Browse files
Add example to documentation
1 parentdeaabd4 commitf98f1e7

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

‎R/api.r‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,29 @@ PCS_run <- function(interconnection_matrix, initial_state, resting_levels, reset
155155
#'
156156
#' @inheritParams PCS_run
157157
#'
158+
#' @examples
159+
#'
160+
#' # Build interconnection matrix
161+
#' interconnections <- matrix(
162+
#' c( 0.0000, 0.1015, 0.0470, 0.0126, 0.0034, 0.0000, 0.0000,
163+
#' 0.1015, 0.0000, 0.0000, 0.0000, 0.0000, 0.0100, -0.0100,
164+
#' 0.0470, 0.0000, 0.0000, 0.0000, 0.0000, 0.0100, -0.0100,
165+
#' 0.0126, 0.0000, 0.0000, 0.0000, 0.0000, 0.0100, -0.0100,
166+
#' 0.0034, 0.0000, 0.0000, 0.0000, 0.0000, -0.0100, 0.0100,
167+
#' 0.0000, 0.0100, 0.0100, 0.0100, -0.0100, 0.0000, -0.2000,
168+
#' 0.0000, -0.0100, -0.0100, -0.0100, 0.0100, -0.2000, 0.0000 ),
169+
#' nrow=7
170+
#' )
171+
#'
172+
#' # Run model
173+
#' result <- PCS_run_from_interconnections(interconnections)
174+
#'
175+
#' # Examine iterations required for convergence
176+
#' result$convergence
177+
#'
178+
#' # Examine final model state
179+
#' result$iterations[nrow(result$iterations),]
180+
#'
158181
#' @export
159182
PCS_run_from_interconnections<-function(interconnection_matrix,
160183
convergence_criteria=c(PCS_convergence_McCandR),convergence_names="default") {

‎man/PCS_run_from_interconnections.Rd‎

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp