From 87e543ab3de9d746295026df1aa730833012e065 Mon Sep 17 00:00:00 2001 From: lukeperry Date: Fri, 21 Jan 2022 16:01:25 -0500 Subject: [PATCH 1/7] remove incorrect documentation from ising-glauber --- R/ising-glauber.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ising-glauber.R b/R/ising-glauber.R index 5701b89..6295297 100644 --- a/R/ising-glauber.R +++ b/R/ising-glauber.R @@ -1,6 +1,6 @@ -#' Implementation to simulate a Kuramoto model of oscillators +#' Implementation to simulate time series on a network from the Ising-Glauber model #' -#' Simulate Kuramoto model on a ground truth network +#' Simulate Ising-Glauber model on a ground truth network #' #' @param input_matrix The input (ground-truth) adjacency matrix of a graph with N nodes. Must be valid N*N square adjacency matrix. #' @param L Integer length of the desired time series. From f8145395f0a556c661129f29e6ddd1e6332b5d04 Mon Sep 17 00:00:00 2001 From: lukeperry Date: Fri, 21 Jan 2022 16:02:06 -0500 Subject: [PATCH 2/7] provide more accurate return documentation --- R/kuramoto.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/kuramoto.R b/R/kuramoto.R index 8a152ad..06ef462 100644 --- a/R/kuramoto.R +++ b/R/kuramoto.R @@ -8,7 +8,7 @@ #' @param strength Float coupling strength (prefactor for interaction terms). #' @param phases Vector of of initial phases. #' @param freqs Vector of internal frequencies. -#' @return An N * L array of synthetic time series data. +#' @return List with TS matrix containing an N*L array of synthetic time series data. #' @export simulate_kuramoto <- function(input_matrix, L, dt = 0.01, strength = 0, phases = NULL, freqs = NULL) { # create return list From dbe38430a44c7745b059b6008396dcabcb1f8ed6 Mon Sep 17 00:00:00 2001 From: lukeperry Date: Fri, 21 Jan 2022 16:03:48 -0500 Subject: [PATCH 3/7] provide more accurate return documentation for lotka-volterra --- R/lotka-volterra.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/lotka-volterra.R b/R/lotka-volterra.R index 16f1a40..e86936c 100644 --- a/R/lotka-volterra.R +++ b/R/lotka-volterra.R @@ -11,7 +11,7 @@ #' @param dt Float or vector of sizes of time steps when simulating the continuous-time dynamics. #' @param stochastic Boolean determining whether to simulate the stochastic or deterministic dynamics. #' @param pertb Vector of perturbation magnitude of nodes' growth. If not specified, default to 0.01 for all nodes. -#' @return An N * L array of synthetic time series data. +#' @return List with TS matrix containing an N*L array of synthetic time series data. #' @export simulate_lotka <- function(input_matrix, L, init = NULL, gr = NULL, cap = NULL, inter = NULL, dt = 1e-2, stochastic = TRUE, pertb = NULL) { # get num of nodes in adj matrix From 8bf337d96402c9e8d7e9735ee10c7ba6de9292d5 Mon Sep 17 00:00:00 2001 From: lukeperry Date: Fri, 21 Jan 2022 16:04:23 -0500 Subject: [PATCH 4/7] provide more accurate return documentation for other R files --- R/sherrington-kirkpatrick.R | 2 +- R/single-unbiased-random-walker.R | 2 +- R/voter.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/sherrington-kirkpatrick.R b/R/sherrington-kirkpatrick.R index 6aad058..ba0f6be 100644 --- a/R/sherrington-kirkpatrick.R +++ b/R/sherrington-kirkpatrick.R @@ -5,7 +5,7 @@ #' @param input_matrix The input (ground-truth) adjacency matrix of a graph with `N` nodes. Must be valid square adjacency matrix. #' @param L The length of the desired time series. #' @param noise True or false value to generate noise -#' @return An N * L array of synthetic time series data +#' @return List with TS matrix containing an N*L array of synthetic time series data. #' @export simulate_sherrington <- function(input_matrix, L, noise = FALSE) { # create return list diff --git a/R/single-unbiased-random-walker.R b/R/single-unbiased-random-walker.R index 5e607e6..39d154e 100644 --- a/R/single-unbiased-random-walker.R +++ b/R/single-unbiased-random-walker.R @@ -10,7 +10,7 @@ #' @param input_matrix the input (ground-truth) graph with N nodes. Must be valid square adjacency matrix. #' @param L the length of the desired time series. #' @param initial_node starting node for walk -#' @return results a list with TS matrix an N*L array of synthetic time series data. +#' @return List with TS matrix containing an N*L array of synthetic time series data. #' @export single_unbiased_random_walker <- function(input_matrix, L, initial_node = NULL) { # get adj matrix and set up vector of indices diff --git a/R/voter.R b/R/voter.R index abdeb79..c0b49ea 100644 --- a/R/voter.R +++ b/R/voter.R @@ -11,7 +11,7 @@ #' @param L the length of the desired time series. #' @param noise if noise is present, with this probability a node's state will be randomly redrawn from (-1,1) \cr #' independent of its neighbors' states. If 'automatic', set noise to 1/N. -#' @return results a list with TS matrix an N*L array of synthetic time series data. +#' @return List with TS matrix containing an N*L array of synthetic time series data. #' @export voter <- function(input_matrix, L, noise = NULL) { # get adj matrix From 1f2196ca1e7bb8f660930f4f8463636f64ed15f3 Mon Sep 17 00:00:00 2001 From: lukeperry Date: Fri, 21 Jan 2022 16:06:04 -0500 Subject: [PATCH 5/7] update return type in vignettes for voter model --- vignettes/dynet.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/dynet.Rmd b/vignettes/dynet.Rmd index 3c79ed6..18da63d 100644 --- a/vignettes/dynet.Rmd +++ b/vignettes/dynet.Rmd @@ -166,7 +166,7 @@ The resulting list stores the initial $N\times N$ ground truth network, $N\times * **initial_node** Starting node for walk ## Returns ## -* An $N\times L$ matrix of synthetic time series data. +* List with the initial $N\times N$ ground truth network, $N\times L$ time series synthetically generated. ## Code Example ## ```{r, eval = FALSE} From eee52b4c51cb0832ae29e805e46704a17f76a699 Mon Sep 17 00:00:00 2001 From: lukeperry Date: Fri, 21 Jan 2022 16:12:23 -0500 Subject: [PATCH 6/7] reset vignettes to original code to see if actions pass --- vignettes/dynet.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/dynet.Rmd b/vignettes/dynet.Rmd index 18da63d..3c79ed6 100644 --- a/vignettes/dynet.Rmd +++ b/vignettes/dynet.Rmd @@ -166,7 +166,7 @@ The resulting list stores the initial $N\times N$ ground truth network, $N\times * **initial_node** Starting node for walk ## Returns ## -* List with the initial $N\times N$ ground truth network, $N\times L$ time series synthetically generated. +* An $N\times L$ matrix of synthetic time series data. ## Code Example ## ```{r, eval = FALSE} From e9b5465649442edbd3552a14ef832261c9b0dbb5 Mon Sep 17 00:00:00 2001 From: lukeperry Date: Fri, 21 Jan 2022 16:20:22 -0500 Subject: [PATCH 7/7] remove incorrect documentation from ising-glauber --- R/ising-glauber.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ising-glauber.R b/R/ising-glauber.R index 5701b89..1844382 100644 --- a/R/ising-glauber.R +++ b/R/ising-glauber.R @@ -1,6 +1,6 @@ -#' Implementation to simulate a Kuramoto model of oscillators +#' Implementation to simulate a Ising-Glauber model of oscillators #' -#' Simulate Kuramoto model on a ground truth network +#' Simulate Ising-Glauber model on a ground truth network #' #' @param input_matrix The input (ground-truth) adjacency matrix of a graph with N nodes. Must be valid N*N square adjacency matrix. #' @param L Integer length of the desired time series.