-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Summary
Using cluster_gen() with select() leaves the unsampled PSUs as data frames filled with NAs. There could be an argument on cluster_gen to clean those up afterwards
MRE
set.seed(1)
df <- cluster_gen(
n = select(sch = 1, cl = 2, st = 4),
N = list(school = 2, class = c(3, 2), student = c(5, 4, 5, 5, 5)),
n_X = 1,
n_W = 1,
verbose = FALSE
)
dfObserved output
Problematic part highlighted:
Expected output
Calling cluster_gen(..., cleanup=TRUE) would return a data frame without the NA-laden data frames.
lsasim version
2.0.2.9008
Reactions are currently unavailable
