Skip to content

Commit

Permalink
Merge pull request #140 from markmfredrickson/i138-aggD
Browse files Browse the repository at this point in the history
Another aggregateDesigns() ordering adjustment
  • Loading branch information
jwbowers authored Nov 13, 2024
2 parents 23ab550 + 42b9004 commit df13b68
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 df13b68

Please sign in to comment.