Skip to content

Commit a11e7b3

Browse files
committed
improve plot labeling
1 parent 7537fad commit a11e7b3

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: blavaan
22
Title: Bayesian Latent Variable Analysis
3-
Version: 0.5-10
3+
Version: 0.5-10.1386
44
Authors@R: c(person(given = "Edgar", family = "Merkle",
55
role = c("aut", "cre"),
66
email = "merklee@missouri.edu",

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
* Bug fixes and internal improvements.
66

7+
## Bugs/glitches:
8+
* plot() does not display certain level 2 parameters in two-level models.
9+
710
# Version 0.5-9
811
## New features
912
* This release contains bug fixes and internal improvements to how model covariance matrices are handled.

R/blav_object_methods.R

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,8 @@ plot.blavaan <- function(x, pars=NULL, plot.type="trace", showplot=TRUE, ...){
284284
parnums <- x@ParTable$stanpnum[match(pars, x@ParTable$free)]
285285
samps <- samps[, , parnums, drop = FALSE]
286286
}
287-
if(blavInspect(x, 'ngroups') == 1L){
288-
dimnames(samps)[[3]] <- with(x@ParTable, paste0(lhs,op,rhs)[match(pars, free)])
289-
} else {
290-
dimnames(samps)[[3]] <- with(x@ParTable, paste0(lhs,op,rhs,".g",group)[match(pars, free)])
291-
}
292-
287+
dimnames(samps)[[3]] <- with(x@ParTable, lav_partable_labels(x@ParTable, type = "user")[match(pars, free)])
288+
293289
plfun <- get(paste0("mcmc_", plot.type), asNamespace("bayesplot"))
294290

295291
pl <- do.call(plfun, c(list(x = samps), list(...)))

0 commit comments

Comments
 (0)