Skip to content

Commit

Permalink
Another aggregateDesigns() ordering adjustment
Browse files Browse the repository at this point in the history
On second thought, what was intended was something like this.
Cf. #138
  • Loading branch information
benthestatistician committed Nov 8, 2024
1 parent 01cbab8 commit 42b9004
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/Design.R
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,10 @@ aggregateDesigns <- function(design) {
# To align w/ this `C_transp`, everything to be returned
# needs to align w/ `levels(Cluster)`, not with
# `Cluster` itself. So,
Z <- Z[levels(Cluster)]
StrataFrame <-
StrataFrame[match(levels(Cluster), as.character(Cluster)),
, drop=FALSE]
cperm <- match(levels(Cluster), as.character(Cluster))
Z <- Z[cperm]
StrataFrame <- StrataFrame[cperm, , drop=FALSE]
Cluster <- Cluster[cperm]

unit.weights <- as.matrix(C_transp %*% as.matrix(design@UnitWeights))

Expand Down

0 comments on commit 42b9004

Please sign in to comment.