You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stop("You must use the transform function over at least two array indices (such as chains and variables), otherwise the result will collapse to a matrix.")
}
obj <- apply(obj,MARGIN=MARGIN,FUN=FUN)
new_dim <- match(save_dim,dim(obj))
# need to re-arrange indices as apply can do that
obj <- aperm(obj,perm=new_dim)
dimnames(obj) <- save_attr
class(obj) <- c("draws_array","draws","array")
return(obj)
}
# example
x <- example_draws()
# by chain and by variable so we can test for convergence