Skip to content

Commit

Permalink
remove methods, fix get_draws args
Browse files Browse the repository at this point in the history
  • Loading branch information
santikka committed Jul 13, 2024
1 parent 3cd6acd commit 8b25865
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Imports:
glue,
ggplot2,
loo,
methods,
patchwork,
posterior,
rlang,
Expand Down
6 changes: 2 additions & 4 deletions R/stan_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,10 @@ get_ndraws <- function(x) {
#' Get the draws of a Stan model fit
#'
#' @inheritParams get_pars_oi
#' @param pars A `character` vector of parameter names.
#' @keywords internal
#' @export
get_draws <- function(x, ...) {
get_draws <- function(x, pars) {
UseMethod("get_draws")
}

Expand Down Expand Up @@ -346,7 +347,6 @@ get_ndraws.CmdStanMCMC_CSV <- function(x) {
}

#' @rdname get_draws
#' @param pars A `character` vector of parameter names
#' @keywords internal
#' @export
get_draws.stanfit <- function(x, pars) {
Expand All @@ -360,15 +360,13 @@ get_draws.stanfit <- function(x, pars) {
}

#' @rdname get_draws
#' @param pars A `character` vector of parameter names
#' @keywords internal
#' @export
get_draws.CmdStanMCMC <- function(x, pars) {
x$draws(variables = pars)
}

#' @rdname get_draws
#' @param pars A `character` vector of parameter names
#' @keywords internal
#' @export
get_draws.CMdStanMCMC_CSV <- function(x, pars) {
Expand Down
4 changes: 2 additions & 2 deletions man/get_draws.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8b25865

Please sign in to comment.