Skip to content

Commit

Permalink
convert lapply to vapply
Browse files Browse the repository at this point in the history
  • Loading branch information
gowerc committed Feb 5, 2024
1 parent 031ef75 commit c587a69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/ParameterList.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,16 @@ names.ParameterList <- function(x) {
#' @describeIn ParameterList-Getter-Methods The parameter-list's parameter initial values
#' @export
initialValues.ParameterList <- function(object, n_chains, ...) {
x <- lapply(
vapply(
seq_len(n_chains),
\(i) {
vals <- lapply(object@parameters, initialValues)
name <- vapply(object@parameters, names, character(1))
names(vals) <- name
vals
}
},
FUN.VALUE = list()
)
return(x)
}


Expand Down

0 comments on commit c587a69

Please sign in to comment.