From 5cf67f7665fd4e39ca5aac0ebbdcff33a7c541b8 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 11 Sep 2023 15:32:59 +0200 Subject: [PATCH] Revert stray changes --- R/data.R | 8 ++++---- man/write_stan_json.Rd | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R/data.R b/R/data.R index a9438bc0a..a1e4ab7c6 100644 --- a/R/data.R +++ b/R/data.R @@ -20,16 +20,16 @@ #' The `list` to `array` conversion is intended to make it easier to prepare #' the data for certain Stan declarations involving arrays: #' -#' * `array[K] vector[J] v` (or equivalently `array[K] vector[J] v ` as of Stan 2.27) +#' * `vector[J] v[K]` (or equivalently `array[K] vector[J] v ` as of Stan 2.27) #' can be constructed in \R as a list with `K` elements where each element a #' vector of length `J` -#' * `array[K] matrix[I,J] v` (or equivalently `array[K] matrix[I,J] m ` as of Stan +#' * `matrix[I,J] v[K]` (or equivalently `array[K] matrix[I,J] m ` as of Stan #' 2.27 ) can be constructed in \R as a list with `K` elements where each element #' an `IxJ` matrix #' #' These can also be passed in from \R as arrays instead of lists but the list #' option is provided for convenience. Unfortunately for arrays with more than -#' one dimension, e.g., `array[K,L] vector[J] v` (or equivalently +#' one dimension, e.g., `vector[J] v[K,L]` (or equivalently #' `array[K,L] vector[J] v ` as of Stan 2.27) it is not possible to use an \R #' list and an array must be used instead. For this example the array in \R #' should have dimensions `KxLxJ`. @@ -49,7 +49,7 @@ #' #' #' # demonstrating list to array conversion -#' # suppose x is declared as `array[2] vector[3] x` (or equivalently `array[2] vector[3] x`) +#' # suppose x is declared as `vector[3] x[2]` (or equivalently `array[2] vector[3] x`) #' # we can use a list of length 2 where each element is a vector of length 3 #' data <- list(x = list(1:3, 4:6)) #' file <- tempfile(fileext = ".json") diff --git a/man/write_stan_json.Rd b/man/write_stan_json.Rd index c76d4db54..cc41c5985 100644 --- a/man/write_stan_json.Rd +++ b/man/write_stan_json.Rd @@ -32,17 +32,17 @@ file: The \code{list} to \code{array} conversion is intended to make it easier to prepare the data for certain Stan declarations involving arrays: \itemize{ -\item \verb{array[K] vector[J] v} (or equivalently \verb{array[K] vector[J] v } as of Stan 2.27) +\item \verb{vector[J] v[K]} (or equivalently \verb{array[K] vector[J] v } as of Stan 2.27) can be constructed in \R as a list with \code{K} elements where each element a vector of length \code{J} -\item \verb{array[K] matrix[I,J] v} (or equivalently \verb{array[K] matrix[I,J] m } as of Stan +\item \verb{matrix[I,J] v[K]} (or equivalently \verb{array[K] matrix[I,J] m } as of Stan 2.27 ) can be constructed in \R as a list with \code{K} elements where each element an \code{IxJ} matrix } These can also be passed in from \R as arrays instead of lists but the list option is provided for convenience. Unfortunately for arrays with more than -one dimension, e.g., \verb{array[K,L] vector[J] v} (or equivalently +one dimension, e.g., \verb{vector[J] v[K,L]} (or equivalently \verb{array[K,L] vector[J] v } as of Stan 2.27) it is not possible to use an \R list and an array must be used instead. For this example the array in \R should have dimensions \code{KxLxJ}. @@ -62,7 +62,7 @@ cat(readLines(file), sep = "\n") # demonstrating list to array conversion -# suppose x is declared as `array[2] vector[3] x` (or equivalently `array[2] vector[3] x`) +# suppose x is declared as `vector[3] x[2]` (or equivalently `array[2] vector[3] x`) # we can use a list of length 2 where each element is a vector of length 3 data <- list(x = list(1:3, 4:6)) file <- tempfile(fileext = ".json")