Skip to contents

Create pseudo IPD given aggregated binary data

Usage

get_pseudo_ipd_binary(binary_agd, format = c("stacked", "unstacked"))

Arguments

binary_agd

a data.frame that take different formats depending on format

format

a string, "stacked" or "unstacked"

Value

a data.frame of pseudo binary IPD, with columns USUBJID, ARM, RESPONSE

Examples

# example of unstacked
testdat <- data.frame(Yes = 280, No = 120)
rownames(testdat) <- "B"
get_pseudo_ipd_binary(
  binary_agd = testdat,
  format = "unstacked"
)
#>                    USUBJID ARM RESPONSE
#> 1     pseudo_binary_subj_1   B     TRUE
#> 2     pseudo_binary_subj_2   B     TRUE
#> 3     pseudo_binary_subj_3   B     TRUE
#> 4     pseudo_binary_subj_4   B     TRUE
#> 5     pseudo_binary_subj_5   B     TRUE
#> 6     pseudo_binary_subj_6   B     TRUE
#> 7     pseudo_binary_subj_7   B     TRUE
#> 8     pseudo_binary_subj_8   B     TRUE
#> 9     pseudo_binary_subj_9   B     TRUE
#> 10   pseudo_binary_subj_10   B     TRUE
#> 11   pseudo_binary_subj_11   B     TRUE
#> 12   pseudo_binary_subj_12   B     TRUE
#> 13   pseudo_binary_subj_13   B     TRUE
#> 14   pseudo_binary_subj_14   B     TRUE
#> 15   pseudo_binary_subj_15   B     TRUE
#> 16   pseudo_binary_subj_16   B     TRUE
#> 17   pseudo_binary_subj_17   B     TRUE
#> 18   pseudo_binary_subj_18   B     TRUE
#> 19   pseudo_binary_subj_19   B     TRUE
#> 20   pseudo_binary_subj_20   B     TRUE
#> 21   pseudo_binary_subj_21   B     TRUE
#> 22   pseudo_binary_subj_22   B     TRUE
#> 23   pseudo_binary_subj_23   B     TRUE
#> 24   pseudo_binary_subj_24   B     TRUE
#> 25   pseudo_binary_subj_25   B     TRUE
#> 26   pseudo_binary_subj_26   B     TRUE
#> 27   pseudo_binary_subj_27   B     TRUE
#> 28   pseudo_binary_subj_28   B     TRUE
#> 29   pseudo_binary_subj_29   B     TRUE
#> 30   pseudo_binary_subj_30   B     TRUE
#> 31   pseudo_binary_subj_31   B     TRUE
#> 32   pseudo_binary_subj_32   B     TRUE
#> 33   pseudo_binary_subj_33   B     TRUE
#> 34   pseudo_binary_subj_34   B     TRUE
#> 35   pseudo_binary_subj_35   B     TRUE
#> 36   pseudo_binary_subj_36   B     TRUE
#> 37   pseudo_binary_subj_37   B     TRUE
#> 38   pseudo_binary_subj_38   B     TRUE
#> 39   pseudo_binary_subj_39   B     TRUE
#> 40   pseudo_binary_subj_40   B     TRUE
#> 41   pseudo_binary_subj_41   B     TRUE
#> 42   pseudo_binary_subj_42   B     TRUE
#> 43   pseudo_binary_subj_43   B     TRUE
#> 44   pseudo_binary_subj_44   B     TRUE
#> 45   pseudo_binary_subj_45   B     TRUE
#> 46   pseudo_binary_subj_46   B     TRUE
#> 47   pseudo_binary_subj_47   B     TRUE
#> 48   pseudo_binary_subj_48   B     TRUE
#> 49   pseudo_binary_subj_49   B     TRUE
#> 50   pseudo_binary_subj_50   B     TRUE
#> 51   pseudo_binary_subj_51   B     TRUE
#> 52   pseudo_binary_subj_52   B     TRUE
#> 53   pseudo_binary_subj_53   B     TRUE
#> 54   pseudo_binary_subj_54   B     TRUE
#> 55   pseudo_binary_subj_55   B     TRUE
#> 56   pseudo_binary_subj_56   B     TRUE
#> 57   pseudo_binary_subj_57   B     TRUE
#> 58   pseudo_binary_subj_58   B     TRUE
#> 59   pseudo_binary_subj_59   B     TRUE
#> 60   pseudo_binary_subj_60   B     TRUE
#> 61   pseudo_binary_subj_61   B     TRUE
#> 62   pseudo_binary_subj_62   B     TRUE
#> 63   pseudo_binary_subj_63   B     TRUE
#> 64   pseudo_binary_subj_64   B     TRUE
#> 65   pseudo_binary_subj_65   B     TRUE
#> 66   pseudo_binary_subj_66   B     TRUE
#> 67   pseudo_binary_subj_67   B     TRUE
#> 68   pseudo_binary_subj_68   B     TRUE
#> 69   pseudo_binary_subj_69   B     TRUE
#> 70   pseudo_binary_subj_70   B     TRUE
#> 71   pseudo_binary_subj_71   B     TRUE
#> 72   pseudo_binary_subj_72   B     TRUE
#> 73   pseudo_binary_subj_73   B     TRUE
#> 74   pseudo_binary_subj_74   B     TRUE
#> 75   pseudo_binary_subj_75   B     TRUE
#> 76   pseudo_binary_subj_76   B     TRUE
#> 77   pseudo_binary_subj_77   B     TRUE
#> 78   pseudo_binary_subj_78   B     TRUE
#> 79   pseudo_binary_subj_79   B     TRUE
#> 80   pseudo_binary_subj_80   B     TRUE
#> 81   pseudo_binary_subj_81   B     TRUE
#> 82   pseudo_binary_subj_82   B     TRUE
#> 83   pseudo_binary_subj_83   B     TRUE
#> 84   pseudo_binary_subj_84   B     TRUE
#> 85   pseudo_binary_subj_85   B     TRUE
#> 86   pseudo_binary_subj_86   B     TRUE
#> 87   pseudo_binary_subj_87   B     TRUE
#> 88   pseudo_binary_subj_88   B     TRUE
#> 89   pseudo_binary_subj_89   B     TRUE
#> 90   pseudo_binary_subj_90   B     TRUE
#> 91   pseudo_binary_subj_91   B     TRUE
#> 92   pseudo_binary_subj_92   B     TRUE
#> 93   pseudo_binary_subj_93   B     TRUE
#> 94   pseudo_binary_subj_94   B     TRUE
#> 95   pseudo_binary_subj_95   B     TRUE
#> 96   pseudo_binary_subj_96   B     TRUE
#> 97   pseudo_binary_subj_97   B     TRUE
#> 98   pseudo_binary_subj_98   B     TRUE
#> 99   pseudo_binary_subj_99   B     TRUE
#> 100 pseudo_binary_subj_100   B     TRUE
#> 101 pseudo_binary_subj_101   B     TRUE
#> 102 pseudo_binary_subj_102   B     TRUE
#> 103 pseudo_binary_subj_103   B     TRUE
#> 104 pseudo_binary_subj_104   B     TRUE
#> 105 pseudo_binary_subj_105   B     TRUE
#> 106 pseudo_binary_subj_106   B     TRUE
#> 107 pseudo_binary_subj_107   B     TRUE
#> 108 pseudo_binary_subj_108   B     TRUE
#> 109 pseudo_binary_subj_109   B     TRUE
#> 110 pseudo_binary_subj_110   B     TRUE
#> 111 pseudo_binary_subj_111   B     TRUE
#> 112 pseudo_binary_subj_112   B     TRUE
#> 113 pseudo_binary_subj_113   B     TRUE
#> 114 pseudo_binary_subj_114   B     TRUE
#> 115 pseudo_binary_subj_115   B     TRUE
#> 116 pseudo_binary_subj_116   B     TRUE
#> 117 pseudo_binary_subj_117   B     TRUE
#> 118 pseudo_binary_subj_118   B     TRUE
#> 119 pseudo_binary_subj_119   B     TRUE
#> 120 pseudo_binary_subj_120   B     TRUE
#> 121 pseudo_binary_subj_121   B     TRUE
#> 122 pseudo_binary_subj_122   B     TRUE
#> 123 pseudo_binary_subj_123   B     TRUE
#> 124 pseudo_binary_subj_124   B     TRUE
#> 125 pseudo_binary_subj_125   B     TRUE
#> 126 pseudo_binary_subj_126   B     TRUE
#> 127 pseudo_binary_subj_127   B     TRUE
#> 128 pseudo_binary_subj_128   B     TRUE
#> 129 pseudo_binary_subj_129   B     TRUE
#> 130 pseudo_binary_subj_130   B     TRUE
#> 131 pseudo_binary_subj_131   B     TRUE
#> 132 pseudo_binary_subj_132   B     TRUE
#> 133 pseudo_binary_subj_133   B     TRUE
#> 134 pseudo_binary_subj_134   B     TRUE
#> 135 pseudo_binary_subj_135   B     TRUE
#> 136 pseudo_binary_subj_136   B     TRUE
#> 137 pseudo_binary_subj_137   B     TRUE
#> 138 pseudo_binary_subj_138   B     TRUE
#> 139 pseudo_binary_subj_139   B     TRUE
#> 140 pseudo_binary_subj_140   B     TRUE
#> 141 pseudo_binary_subj_141   B     TRUE
#> 142 pseudo_binary_subj_142   B     TRUE
#> 143 pseudo_binary_subj_143   B     TRUE
#> 144 pseudo_binary_subj_144   B     TRUE
#> 145 pseudo_binary_subj_145   B     TRUE
#> 146 pseudo_binary_subj_146   B     TRUE
#> 147 pseudo_binary_subj_147   B     TRUE
#> 148 pseudo_binary_subj_148   B     TRUE
#> 149 pseudo_binary_subj_149   B     TRUE
#> 150 pseudo_binary_subj_150   B     TRUE
#> 151 pseudo_binary_subj_151   B     TRUE
#> 152 pseudo_binary_subj_152   B     TRUE
#> 153 pseudo_binary_subj_153   B     TRUE
#> 154 pseudo_binary_subj_154   B     TRUE
#> 155 pseudo_binary_subj_155   B     TRUE
#> 156 pseudo_binary_subj_156   B     TRUE
#> 157 pseudo_binary_subj_157   B     TRUE
#> 158 pseudo_binary_subj_158   B     TRUE
#> 159 pseudo_binary_subj_159   B     TRUE
#> 160 pseudo_binary_subj_160   B     TRUE
#> 161 pseudo_binary_subj_161   B     TRUE
#> 162 pseudo_binary_subj_162   B     TRUE
#> 163 pseudo_binary_subj_163   B     TRUE
#> 164 pseudo_binary_subj_164   B     TRUE
#> 165 pseudo_binary_subj_165   B     TRUE
#> 166 pseudo_binary_subj_166   B     TRUE
#> 167 pseudo_binary_subj_167   B     TRUE
#> 168 pseudo_binary_subj_168   B     TRUE
#> 169 pseudo_binary_subj_169   B     TRUE
#> 170 pseudo_binary_subj_170   B     TRUE
#> 171 pseudo_binary_subj_171   B     TRUE
#> 172 pseudo_binary_subj_172   B     TRUE
#> 173 pseudo_binary_subj_173   B     TRUE
#> 174 pseudo_binary_subj_174   B     TRUE
#> 175 pseudo_binary_subj_175   B     TRUE
#> 176 pseudo_binary_subj_176   B     TRUE
#> 177 pseudo_binary_subj_177   B     TRUE
#> 178 pseudo_binary_subj_178   B     TRUE
#> 179 pseudo_binary_subj_179   B     TRUE
#> 180 pseudo_binary_subj_180   B     TRUE
#> 181 pseudo_binary_subj_181   B     TRUE
#> 182 pseudo_binary_subj_182   B     TRUE
#> 183 pseudo_binary_subj_183   B     TRUE
#> 184 pseudo_binary_subj_184   B     TRUE
#> 185 pseudo_binary_subj_185   B     TRUE
#> 186 pseudo_binary_subj_186   B     TRUE
#> 187 pseudo_binary_subj_187   B     TRUE
#> 188 pseudo_binary_subj_188   B     TRUE
#> 189 pseudo_binary_subj_189   B     TRUE
#> 190 pseudo_binary_subj_190   B     TRUE
#> 191 pseudo_binary_subj_191   B     TRUE
#> 192 pseudo_binary_subj_192   B     TRUE
#> 193 pseudo_binary_subj_193   B     TRUE
#> 194 pseudo_binary_subj_194   B     TRUE
#> 195 pseudo_binary_subj_195   B     TRUE
#> 196 pseudo_binary_subj_196   B     TRUE
#> 197 pseudo_binary_subj_197   B     TRUE
#> 198 pseudo_binary_subj_198   B     TRUE
#> 199 pseudo_binary_subj_199   B     TRUE
#> 200 pseudo_binary_subj_200   B     TRUE
#> 201 pseudo_binary_subj_201   B     TRUE
#> 202 pseudo_binary_subj_202   B     TRUE
#> 203 pseudo_binary_subj_203   B     TRUE
#> 204 pseudo_binary_subj_204   B     TRUE
#> 205 pseudo_binary_subj_205   B     TRUE
#> 206 pseudo_binary_subj_206   B     TRUE
#> 207 pseudo_binary_subj_207   B     TRUE
#> 208 pseudo_binary_subj_208   B     TRUE
#> 209 pseudo_binary_subj_209   B     TRUE
#> 210 pseudo_binary_subj_210   B     TRUE
#> 211 pseudo_binary_subj_211   B     TRUE
#> 212 pseudo_binary_subj_212   B     TRUE
#> 213 pseudo_binary_subj_213   B     TRUE
#> 214 pseudo_binary_subj_214   B     TRUE
#> 215 pseudo_binary_subj_215   B     TRUE
#> 216 pseudo_binary_subj_216   B     TRUE
#> 217 pseudo_binary_subj_217   B     TRUE
#> 218 pseudo_binary_subj_218   B     TRUE
#> 219 pseudo_binary_subj_219   B     TRUE
#> 220 pseudo_binary_subj_220   B     TRUE
#> 221 pseudo_binary_subj_221   B     TRUE
#> 222 pseudo_binary_subj_222   B     TRUE
#> 223 pseudo_binary_subj_223   B     TRUE
#> 224 pseudo_binary_subj_224   B     TRUE
#> 225 pseudo_binary_subj_225   B     TRUE
#> 226 pseudo_binary_subj_226   B     TRUE
#> 227 pseudo_binary_subj_227   B     TRUE
#> 228 pseudo_binary_subj_228   B     TRUE
#> 229 pseudo_binary_subj_229   B     TRUE
#> 230 pseudo_binary_subj_230   B     TRUE
#> 231 pseudo_binary_subj_231   B     TRUE
#> 232 pseudo_binary_subj_232   B     TRUE
#> 233 pseudo_binary_subj_233   B     TRUE
#> 234 pseudo_binary_subj_234   B     TRUE
#> 235 pseudo_binary_subj_235   B     TRUE
#> 236 pseudo_binary_subj_236   B     TRUE
#> 237 pseudo_binary_subj_237   B     TRUE
#> 238 pseudo_binary_subj_238   B     TRUE
#> 239 pseudo_binary_subj_239   B     TRUE
#> 240 pseudo_binary_subj_240   B     TRUE
#> 241 pseudo_binary_subj_241   B     TRUE
#> 242 pseudo_binary_subj_242   B     TRUE
#> 243 pseudo_binary_subj_243   B     TRUE
#> 244 pseudo_binary_subj_244   B     TRUE
#> 245 pseudo_binary_subj_245   B     TRUE
#> 246 pseudo_binary_subj_246   B     TRUE
#> 247 pseudo_binary_subj_247   B     TRUE
#> 248 pseudo_binary_subj_248   B     TRUE
#> 249 pseudo_binary_subj_249   B     TRUE
#> 250 pseudo_binary_subj_250   B     TRUE
#> 251 pseudo_binary_subj_251   B     TRUE
#> 252 pseudo_binary_subj_252   B     TRUE
#> 253 pseudo_binary_subj_253   B     TRUE
#> 254 pseudo_binary_subj_254   B     TRUE
#> 255 pseudo_binary_subj_255   B     TRUE
#> 256 pseudo_binary_subj_256   B     TRUE
#> 257 pseudo_binary_subj_257   B     TRUE
#> 258 pseudo_binary_subj_258   B     TRUE
#> 259 pseudo_binary_subj_259   B     TRUE
#> 260 pseudo_binary_subj_260   B     TRUE
#> 261 pseudo_binary_subj_261   B     TRUE
#> 262 pseudo_binary_subj_262   B     TRUE
#> 263 pseudo_binary_subj_263   B     TRUE
#> 264 pseudo_binary_subj_264   B     TRUE
#> 265 pseudo_binary_subj_265   B     TRUE
#> 266 pseudo_binary_subj_266   B     TRUE
#> 267 pseudo_binary_subj_267   B     TRUE
#> 268 pseudo_binary_subj_268   B     TRUE
#> 269 pseudo_binary_subj_269   B     TRUE
#> 270 pseudo_binary_subj_270   B     TRUE
#> 271 pseudo_binary_subj_271   B     TRUE
#> 272 pseudo_binary_subj_272   B     TRUE
#> 273 pseudo_binary_subj_273   B     TRUE
#> 274 pseudo_binary_subj_274   B     TRUE
#> 275 pseudo_binary_subj_275   B     TRUE
#> 276 pseudo_binary_subj_276   B     TRUE
#> 277 pseudo_binary_subj_277   B     TRUE
#> 278 pseudo_binary_subj_278   B     TRUE
#> 279 pseudo_binary_subj_279   B     TRUE
#> 280 pseudo_binary_subj_280   B     TRUE
#> 281 pseudo_binary_subj_281   B    FALSE
#> 282 pseudo_binary_subj_282   B    FALSE
#> 283 pseudo_binary_subj_283   B    FALSE
#> 284 pseudo_binary_subj_284   B    FALSE
#> 285 pseudo_binary_subj_285   B    FALSE
#> 286 pseudo_binary_subj_286   B    FALSE
#> 287 pseudo_binary_subj_287   B    FALSE
#> 288 pseudo_binary_subj_288   B    FALSE
#> 289 pseudo_binary_subj_289   B    FALSE
#> 290 pseudo_binary_subj_290   B    FALSE
#> 291 pseudo_binary_subj_291   B    FALSE
#> 292 pseudo_binary_subj_292   B    FALSE
#> 293 pseudo_binary_subj_293   B    FALSE
#> 294 pseudo_binary_subj_294   B    FALSE
#> 295 pseudo_binary_subj_295   B    FALSE
#> 296 pseudo_binary_subj_296   B    FALSE
#> 297 pseudo_binary_subj_297   B    FALSE
#> 298 pseudo_binary_subj_298   B    FALSE
#> 299 pseudo_binary_subj_299   B    FALSE
#> 300 pseudo_binary_subj_300   B    FALSE
#> 301 pseudo_binary_subj_301   B    FALSE
#> 302 pseudo_binary_subj_302   B    FALSE
#> 303 pseudo_binary_subj_303   B    FALSE
#> 304 pseudo_binary_subj_304   B    FALSE
#> 305 pseudo_binary_subj_305   B    FALSE
#> 306 pseudo_binary_subj_306   B    FALSE
#> 307 pseudo_binary_subj_307   B    FALSE
#> 308 pseudo_binary_subj_308   B    FALSE
#> 309 pseudo_binary_subj_309   B    FALSE
#> 310 pseudo_binary_subj_310   B    FALSE
#> 311 pseudo_binary_subj_311   B    FALSE
#> 312 pseudo_binary_subj_312   B    FALSE
#> 313 pseudo_binary_subj_313   B    FALSE
#> 314 pseudo_binary_subj_314   B    FALSE
#> 315 pseudo_binary_subj_315   B    FALSE
#> 316 pseudo_binary_subj_316   B    FALSE
#> 317 pseudo_binary_subj_317   B    FALSE
#> 318 pseudo_binary_subj_318   B    FALSE
#> 319 pseudo_binary_subj_319   B    FALSE
#> 320 pseudo_binary_subj_320   B    FALSE
#> 321 pseudo_binary_subj_321   B    FALSE
#> 322 pseudo_binary_subj_322   B    FALSE
#> 323 pseudo_binary_subj_323   B    FALSE
#> 324 pseudo_binary_subj_324   B    FALSE
#> 325 pseudo_binary_subj_325   B    FALSE
#> 326 pseudo_binary_subj_326   B    FALSE
#> 327 pseudo_binary_subj_327   B    FALSE
#> 328 pseudo_binary_subj_328   B    FALSE
#> 329 pseudo_binary_subj_329   B    FALSE
#> 330 pseudo_binary_subj_330   B    FALSE
#> 331 pseudo_binary_subj_331   B    FALSE
#> 332 pseudo_binary_subj_332   B    FALSE
#> 333 pseudo_binary_subj_333   B    FALSE
#> 334 pseudo_binary_subj_334   B    FALSE
#> 335 pseudo_binary_subj_335   B    FALSE
#> 336 pseudo_binary_subj_336   B    FALSE
#> 337 pseudo_binary_subj_337   B    FALSE
#> 338 pseudo_binary_subj_338   B    FALSE
#> 339 pseudo_binary_subj_339   B    FALSE
#> 340 pseudo_binary_subj_340   B    FALSE
#> 341 pseudo_binary_subj_341   B    FALSE
#> 342 pseudo_binary_subj_342   B    FALSE
#> 343 pseudo_binary_subj_343   B    FALSE
#> 344 pseudo_binary_subj_344   B    FALSE
#> 345 pseudo_binary_subj_345   B    FALSE
#> 346 pseudo_binary_subj_346   B    FALSE
#> 347 pseudo_binary_subj_347   B    FALSE
#> 348 pseudo_binary_subj_348   B    FALSE
#> 349 pseudo_binary_subj_349   B    FALSE
#> 350 pseudo_binary_subj_350   B    FALSE
#> 351 pseudo_binary_subj_351   B    FALSE
#> 352 pseudo_binary_subj_352   B    FALSE
#> 353 pseudo_binary_subj_353   B    FALSE
#> 354 pseudo_binary_subj_354   B    FALSE
#> 355 pseudo_binary_subj_355   B    FALSE
#> 356 pseudo_binary_subj_356   B    FALSE
#> 357 pseudo_binary_subj_357   B    FALSE
#> 358 pseudo_binary_subj_358   B    FALSE
#> 359 pseudo_binary_subj_359   B    FALSE
#> 360 pseudo_binary_subj_360   B    FALSE
#> 361 pseudo_binary_subj_361   B    FALSE
#> 362 pseudo_binary_subj_362   B    FALSE
#> 363 pseudo_binary_subj_363   B    FALSE
#> 364 pseudo_binary_subj_364   B    FALSE
#> 365 pseudo_binary_subj_365   B    FALSE
#> 366 pseudo_binary_subj_366   B    FALSE
#> 367 pseudo_binary_subj_367   B    FALSE
#> 368 pseudo_binary_subj_368   B    FALSE
#> 369 pseudo_binary_subj_369   B    FALSE
#> 370 pseudo_binary_subj_370   B    FALSE
#> 371 pseudo_binary_subj_371   B    FALSE
#> 372 pseudo_binary_subj_372   B    FALSE
#> 373 pseudo_binary_subj_373   B    FALSE
#> 374 pseudo_binary_subj_374   B    FALSE
#> 375 pseudo_binary_subj_375   B    FALSE
#> 376 pseudo_binary_subj_376   B    FALSE
#> 377 pseudo_binary_subj_377   B    FALSE
#> 378 pseudo_binary_subj_378   B    FALSE
#> 379 pseudo_binary_subj_379   B    FALSE
#> 380 pseudo_binary_subj_380   B    FALSE
#> 381 pseudo_binary_subj_381   B    FALSE
#> 382 pseudo_binary_subj_382   B    FALSE
#> 383 pseudo_binary_subj_383   B    FALSE
#> 384 pseudo_binary_subj_384   B    FALSE
#> 385 pseudo_binary_subj_385   B    FALSE
#> 386 pseudo_binary_subj_386   B    FALSE
#> 387 pseudo_binary_subj_387   B    FALSE
#> 388 pseudo_binary_subj_388   B    FALSE
#> 389 pseudo_binary_subj_389   B    FALSE
#> 390 pseudo_binary_subj_390   B    FALSE
#> 391 pseudo_binary_subj_391   B    FALSE
#> 392 pseudo_binary_subj_392   B    FALSE
#> 393 pseudo_binary_subj_393   B    FALSE
#> 394 pseudo_binary_subj_394   B    FALSE
#> 395 pseudo_binary_subj_395   B    FALSE
#> 396 pseudo_binary_subj_396   B    FALSE
#> 397 pseudo_binary_subj_397   B    FALSE
#> 398 pseudo_binary_subj_398   B    FALSE
#> 399 pseudo_binary_subj_399   B    FALSE
#> 400 pseudo_binary_subj_400   B    FALSE

# example of stacked
get_pseudo_ipd_binary(
  binary_agd = data.frame(
    ARM = rep("B", 2),
    RESPONSE = c("YES", "NO"),
    COUNT = c(280, 120)
  ),
  format = "stacked"
)
#>                    USUBJID ARM RESPONSE
#> 1     pseudo_binary_subj_1   B     TRUE
#> 2     pseudo_binary_subj_2   B     TRUE
#> 3     pseudo_binary_subj_3   B     TRUE
#> 4     pseudo_binary_subj_4   B     TRUE
#> 5     pseudo_binary_subj_5   B     TRUE
#> 6     pseudo_binary_subj_6   B     TRUE
#> 7     pseudo_binary_subj_7   B     TRUE
#> 8     pseudo_binary_subj_8   B     TRUE
#> 9     pseudo_binary_subj_9   B     TRUE
#> 10   pseudo_binary_subj_10   B     TRUE
#> 11   pseudo_binary_subj_11   B     TRUE
#> 12   pseudo_binary_subj_12   B     TRUE
#> 13   pseudo_binary_subj_13   B     TRUE
#> 14   pseudo_binary_subj_14   B     TRUE
#> 15   pseudo_binary_subj_15   B     TRUE
#> 16   pseudo_binary_subj_16   B     TRUE
#> 17   pseudo_binary_subj_17   B     TRUE
#> 18   pseudo_binary_subj_18   B     TRUE
#> 19   pseudo_binary_subj_19   B     TRUE
#> 20   pseudo_binary_subj_20   B     TRUE
#> 21   pseudo_binary_subj_21   B     TRUE
#> 22   pseudo_binary_subj_22   B     TRUE
#> 23   pseudo_binary_subj_23   B     TRUE
#> 24   pseudo_binary_subj_24   B     TRUE
#> 25   pseudo_binary_subj_25   B     TRUE
#> 26   pseudo_binary_subj_26   B     TRUE
#> 27   pseudo_binary_subj_27   B     TRUE
#> 28   pseudo_binary_subj_28   B     TRUE
#> 29   pseudo_binary_subj_29   B     TRUE
#> 30   pseudo_binary_subj_30   B     TRUE
#> 31   pseudo_binary_subj_31   B     TRUE
#> 32   pseudo_binary_subj_32   B     TRUE
#> 33   pseudo_binary_subj_33   B     TRUE
#> 34   pseudo_binary_subj_34   B     TRUE
#> 35   pseudo_binary_subj_35   B     TRUE
#> 36   pseudo_binary_subj_36   B     TRUE
#> 37   pseudo_binary_subj_37   B     TRUE
#> 38   pseudo_binary_subj_38   B     TRUE
#> 39   pseudo_binary_subj_39   B     TRUE
#> 40   pseudo_binary_subj_40   B     TRUE
#> 41   pseudo_binary_subj_41   B     TRUE
#> 42   pseudo_binary_subj_42   B     TRUE
#> 43   pseudo_binary_subj_43   B     TRUE
#> 44   pseudo_binary_subj_44   B     TRUE
#> 45   pseudo_binary_subj_45   B     TRUE
#> 46   pseudo_binary_subj_46   B     TRUE
#> 47   pseudo_binary_subj_47   B     TRUE
#> 48   pseudo_binary_subj_48   B     TRUE
#> 49   pseudo_binary_subj_49   B     TRUE
#> 50   pseudo_binary_subj_50   B     TRUE
#> 51   pseudo_binary_subj_51   B     TRUE
#> 52   pseudo_binary_subj_52   B     TRUE
#> 53   pseudo_binary_subj_53   B     TRUE
#> 54   pseudo_binary_subj_54   B     TRUE
#> 55   pseudo_binary_subj_55   B     TRUE
#> 56   pseudo_binary_subj_56   B     TRUE
#> 57   pseudo_binary_subj_57   B     TRUE
#> 58   pseudo_binary_subj_58   B     TRUE
#> 59   pseudo_binary_subj_59   B     TRUE
#> 60   pseudo_binary_subj_60   B     TRUE
#> 61   pseudo_binary_subj_61   B     TRUE
#> 62   pseudo_binary_subj_62   B     TRUE
#> 63   pseudo_binary_subj_63   B     TRUE
#> 64   pseudo_binary_subj_64   B     TRUE
#> 65   pseudo_binary_subj_65   B     TRUE
#> 66   pseudo_binary_subj_66   B     TRUE
#> 67   pseudo_binary_subj_67   B     TRUE
#> 68   pseudo_binary_subj_68   B     TRUE
#> 69   pseudo_binary_subj_69   B     TRUE
#> 70   pseudo_binary_subj_70   B     TRUE
#> 71   pseudo_binary_subj_71   B     TRUE
#> 72   pseudo_binary_subj_72   B     TRUE
#> 73   pseudo_binary_subj_73   B     TRUE
#> 74   pseudo_binary_subj_74   B     TRUE
#> 75   pseudo_binary_subj_75   B     TRUE
#> 76   pseudo_binary_subj_76   B     TRUE
#> 77   pseudo_binary_subj_77   B     TRUE
#> 78   pseudo_binary_subj_78   B     TRUE
#> 79   pseudo_binary_subj_79   B     TRUE
#> 80   pseudo_binary_subj_80   B     TRUE
#> 81   pseudo_binary_subj_81   B     TRUE
#> 82   pseudo_binary_subj_82   B     TRUE
#> 83   pseudo_binary_subj_83   B     TRUE
#> 84   pseudo_binary_subj_84   B     TRUE
#> 85   pseudo_binary_subj_85   B     TRUE
#> 86   pseudo_binary_subj_86   B     TRUE
#> 87   pseudo_binary_subj_87   B     TRUE
#> 88   pseudo_binary_subj_88   B     TRUE
#> 89   pseudo_binary_subj_89   B     TRUE
#> 90   pseudo_binary_subj_90   B     TRUE
#> 91   pseudo_binary_subj_91   B     TRUE
#> 92   pseudo_binary_subj_92   B     TRUE
#> 93   pseudo_binary_subj_93   B     TRUE
#> 94   pseudo_binary_subj_94   B     TRUE
#> 95   pseudo_binary_subj_95   B     TRUE
#> 96   pseudo_binary_subj_96   B     TRUE
#> 97   pseudo_binary_subj_97   B     TRUE
#> 98   pseudo_binary_subj_98   B     TRUE
#> 99   pseudo_binary_subj_99   B     TRUE
#> 100 pseudo_binary_subj_100   B     TRUE
#> 101 pseudo_binary_subj_101   B     TRUE
#> 102 pseudo_binary_subj_102   B     TRUE
#> 103 pseudo_binary_subj_103   B     TRUE
#> 104 pseudo_binary_subj_104   B     TRUE
#> 105 pseudo_binary_subj_105   B     TRUE
#> 106 pseudo_binary_subj_106   B     TRUE
#> 107 pseudo_binary_subj_107   B     TRUE
#> 108 pseudo_binary_subj_108   B     TRUE
#> 109 pseudo_binary_subj_109   B     TRUE
#> 110 pseudo_binary_subj_110   B     TRUE
#> 111 pseudo_binary_subj_111   B     TRUE
#> 112 pseudo_binary_subj_112   B     TRUE
#> 113 pseudo_binary_subj_113   B     TRUE
#> 114 pseudo_binary_subj_114   B     TRUE
#> 115 pseudo_binary_subj_115   B     TRUE
#> 116 pseudo_binary_subj_116   B     TRUE
#> 117 pseudo_binary_subj_117   B     TRUE
#> 118 pseudo_binary_subj_118   B     TRUE
#> 119 pseudo_binary_subj_119   B     TRUE
#> 120 pseudo_binary_subj_120   B     TRUE
#> 121 pseudo_binary_subj_121   B     TRUE
#> 122 pseudo_binary_subj_122   B     TRUE
#> 123 pseudo_binary_subj_123   B     TRUE
#> 124 pseudo_binary_subj_124   B     TRUE
#> 125 pseudo_binary_subj_125   B     TRUE
#> 126 pseudo_binary_subj_126   B     TRUE
#> 127 pseudo_binary_subj_127   B     TRUE
#> 128 pseudo_binary_subj_128   B     TRUE
#> 129 pseudo_binary_subj_129   B     TRUE
#> 130 pseudo_binary_subj_130   B     TRUE
#> 131 pseudo_binary_subj_131   B     TRUE
#> 132 pseudo_binary_subj_132   B     TRUE
#> 133 pseudo_binary_subj_133   B     TRUE
#> 134 pseudo_binary_subj_134   B     TRUE
#> 135 pseudo_binary_subj_135   B     TRUE
#> 136 pseudo_binary_subj_136   B     TRUE
#> 137 pseudo_binary_subj_137   B     TRUE
#> 138 pseudo_binary_subj_138   B     TRUE
#> 139 pseudo_binary_subj_139   B     TRUE
#> 140 pseudo_binary_subj_140   B     TRUE
#> 141 pseudo_binary_subj_141   B     TRUE
#> 142 pseudo_binary_subj_142   B     TRUE
#> 143 pseudo_binary_subj_143   B     TRUE
#> 144 pseudo_binary_subj_144   B     TRUE
#> 145 pseudo_binary_subj_145   B     TRUE
#> 146 pseudo_binary_subj_146   B     TRUE
#> 147 pseudo_binary_subj_147   B     TRUE
#> 148 pseudo_binary_subj_148   B     TRUE
#> 149 pseudo_binary_subj_149   B     TRUE
#> 150 pseudo_binary_subj_150   B     TRUE
#> 151 pseudo_binary_subj_151   B     TRUE
#> 152 pseudo_binary_subj_152   B     TRUE
#> 153 pseudo_binary_subj_153   B     TRUE
#> 154 pseudo_binary_subj_154   B     TRUE
#> 155 pseudo_binary_subj_155   B     TRUE
#> 156 pseudo_binary_subj_156   B     TRUE
#> 157 pseudo_binary_subj_157   B     TRUE
#> 158 pseudo_binary_subj_158   B     TRUE
#> 159 pseudo_binary_subj_159   B     TRUE
#> 160 pseudo_binary_subj_160   B     TRUE
#> 161 pseudo_binary_subj_161   B     TRUE
#> 162 pseudo_binary_subj_162   B     TRUE
#> 163 pseudo_binary_subj_163   B     TRUE
#> 164 pseudo_binary_subj_164   B     TRUE
#> 165 pseudo_binary_subj_165   B     TRUE
#> 166 pseudo_binary_subj_166   B     TRUE
#> 167 pseudo_binary_subj_167   B     TRUE
#> 168 pseudo_binary_subj_168   B     TRUE
#> 169 pseudo_binary_subj_169   B     TRUE
#> 170 pseudo_binary_subj_170   B     TRUE
#> 171 pseudo_binary_subj_171   B     TRUE
#> 172 pseudo_binary_subj_172   B     TRUE
#> 173 pseudo_binary_subj_173   B     TRUE
#> 174 pseudo_binary_subj_174   B     TRUE
#> 175 pseudo_binary_subj_175   B     TRUE
#> 176 pseudo_binary_subj_176   B     TRUE
#> 177 pseudo_binary_subj_177   B     TRUE
#> 178 pseudo_binary_subj_178   B     TRUE
#> 179 pseudo_binary_subj_179   B     TRUE
#> 180 pseudo_binary_subj_180   B     TRUE
#> 181 pseudo_binary_subj_181   B     TRUE
#> 182 pseudo_binary_subj_182   B     TRUE
#> 183 pseudo_binary_subj_183   B     TRUE
#> 184 pseudo_binary_subj_184   B     TRUE
#> 185 pseudo_binary_subj_185   B     TRUE
#> 186 pseudo_binary_subj_186   B     TRUE
#> 187 pseudo_binary_subj_187   B     TRUE
#> 188 pseudo_binary_subj_188   B     TRUE
#> 189 pseudo_binary_subj_189   B     TRUE
#> 190 pseudo_binary_subj_190   B     TRUE
#> 191 pseudo_binary_subj_191   B     TRUE
#> 192 pseudo_binary_subj_192   B     TRUE
#> 193 pseudo_binary_subj_193   B     TRUE
#> 194 pseudo_binary_subj_194   B     TRUE
#> 195 pseudo_binary_subj_195   B     TRUE
#> 196 pseudo_binary_subj_196   B     TRUE
#> 197 pseudo_binary_subj_197   B     TRUE
#> 198 pseudo_binary_subj_198   B     TRUE
#> 199 pseudo_binary_subj_199   B     TRUE
#> 200 pseudo_binary_subj_200   B     TRUE
#> 201 pseudo_binary_subj_201   B     TRUE
#> 202 pseudo_binary_subj_202   B     TRUE
#> 203 pseudo_binary_subj_203   B     TRUE
#> 204 pseudo_binary_subj_204   B     TRUE
#> 205 pseudo_binary_subj_205   B     TRUE
#> 206 pseudo_binary_subj_206   B     TRUE
#> 207 pseudo_binary_subj_207   B     TRUE
#> 208 pseudo_binary_subj_208   B     TRUE
#> 209 pseudo_binary_subj_209   B     TRUE
#> 210 pseudo_binary_subj_210   B     TRUE
#> 211 pseudo_binary_subj_211   B     TRUE
#> 212 pseudo_binary_subj_212   B     TRUE
#> 213 pseudo_binary_subj_213   B     TRUE
#> 214 pseudo_binary_subj_214   B     TRUE
#> 215 pseudo_binary_subj_215   B     TRUE
#> 216 pseudo_binary_subj_216   B     TRUE
#> 217 pseudo_binary_subj_217   B     TRUE
#> 218 pseudo_binary_subj_218   B     TRUE
#> 219 pseudo_binary_subj_219   B     TRUE
#> 220 pseudo_binary_subj_220   B     TRUE
#> 221 pseudo_binary_subj_221   B     TRUE
#> 222 pseudo_binary_subj_222   B     TRUE
#> 223 pseudo_binary_subj_223   B     TRUE
#> 224 pseudo_binary_subj_224   B     TRUE
#> 225 pseudo_binary_subj_225   B     TRUE
#> 226 pseudo_binary_subj_226   B     TRUE
#> 227 pseudo_binary_subj_227   B     TRUE
#> 228 pseudo_binary_subj_228   B     TRUE
#> 229 pseudo_binary_subj_229   B     TRUE
#> 230 pseudo_binary_subj_230   B     TRUE
#> 231 pseudo_binary_subj_231   B     TRUE
#> 232 pseudo_binary_subj_232   B     TRUE
#> 233 pseudo_binary_subj_233   B     TRUE
#> 234 pseudo_binary_subj_234   B     TRUE
#> 235 pseudo_binary_subj_235   B     TRUE
#> 236 pseudo_binary_subj_236   B     TRUE
#> 237 pseudo_binary_subj_237   B     TRUE
#> 238 pseudo_binary_subj_238   B     TRUE
#> 239 pseudo_binary_subj_239   B     TRUE
#> 240 pseudo_binary_subj_240   B     TRUE
#> 241 pseudo_binary_subj_241   B     TRUE
#> 242 pseudo_binary_subj_242   B     TRUE
#> 243 pseudo_binary_subj_243   B     TRUE
#> 244 pseudo_binary_subj_244   B     TRUE
#> 245 pseudo_binary_subj_245   B     TRUE
#> 246 pseudo_binary_subj_246   B     TRUE
#> 247 pseudo_binary_subj_247   B     TRUE
#> 248 pseudo_binary_subj_248   B     TRUE
#> 249 pseudo_binary_subj_249   B     TRUE
#> 250 pseudo_binary_subj_250   B     TRUE
#> 251 pseudo_binary_subj_251   B     TRUE
#> 252 pseudo_binary_subj_252   B     TRUE
#> 253 pseudo_binary_subj_253   B     TRUE
#> 254 pseudo_binary_subj_254   B     TRUE
#> 255 pseudo_binary_subj_255   B     TRUE
#> 256 pseudo_binary_subj_256   B     TRUE
#> 257 pseudo_binary_subj_257   B     TRUE
#> 258 pseudo_binary_subj_258   B     TRUE
#> 259 pseudo_binary_subj_259   B     TRUE
#> 260 pseudo_binary_subj_260   B     TRUE
#> 261 pseudo_binary_subj_261   B     TRUE
#> 262 pseudo_binary_subj_262   B     TRUE
#> 263 pseudo_binary_subj_263   B     TRUE
#> 264 pseudo_binary_subj_264   B     TRUE
#> 265 pseudo_binary_subj_265   B     TRUE
#> 266 pseudo_binary_subj_266   B     TRUE
#> 267 pseudo_binary_subj_267   B     TRUE
#> 268 pseudo_binary_subj_268   B     TRUE
#> 269 pseudo_binary_subj_269   B     TRUE
#> 270 pseudo_binary_subj_270   B     TRUE
#> 271 pseudo_binary_subj_271   B     TRUE
#> 272 pseudo_binary_subj_272   B     TRUE
#> 273 pseudo_binary_subj_273   B     TRUE
#> 274 pseudo_binary_subj_274   B     TRUE
#> 275 pseudo_binary_subj_275   B     TRUE
#> 276 pseudo_binary_subj_276   B     TRUE
#> 277 pseudo_binary_subj_277   B     TRUE
#> 278 pseudo_binary_subj_278   B     TRUE
#> 279 pseudo_binary_subj_279   B     TRUE
#> 280 pseudo_binary_subj_280   B     TRUE
#> 281 pseudo_binary_subj_281   B    FALSE
#> 282 pseudo_binary_subj_282   B    FALSE
#> 283 pseudo_binary_subj_283   B    FALSE
#> 284 pseudo_binary_subj_284   B    FALSE
#> 285 pseudo_binary_subj_285   B    FALSE
#> 286 pseudo_binary_subj_286   B    FALSE
#> 287 pseudo_binary_subj_287   B    FALSE
#> 288 pseudo_binary_subj_288   B    FALSE
#> 289 pseudo_binary_subj_289   B    FALSE
#> 290 pseudo_binary_subj_290   B    FALSE
#> 291 pseudo_binary_subj_291   B    FALSE
#> 292 pseudo_binary_subj_292   B    FALSE
#> 293 pseudo_binary_subj_293   B    FALSE
#> 294 pseudo_binary_subj_294   B    FALSE
#> 295 pseudo_binary_subj_295   B    FALSE
#> 296 pseudo_binary_subj_296   B    FALSE
#> 297 pseudo_binary_subj_297   B    FALSE
#> 298 pseudo_binary_subj_298   B    FALSE
#> 299 pseudo_binary_subj_299   B    FALSE
#> 300 pseudo_binary_subj_300   B    FALSE
#> 301 pseudo_binary_subj_301   B    FALSE
#> 302 pseudo_binary_subj_302   B    FALSE
#> 303 pseudo_binary_subj_303   B    FALSE
#> 304 pseudo_binary_subj_304   B    FALSE
#> 305 pseudo_binary_subj_305   B    FALSE
#> 306 pseudo_binary_subj_306   B    FALSE
#> 307 pseudo_binary_subj_307   B    FALSE
#> 308 pseudo_binary_subj_308   B    FALSE
#> 309 pseudo_binary_subj_309   B    FALSE
#> 310 pseudo_binary_subj_310   B    FALSE
#> 311 pseudo_binary_subj_311   B    FALSE
#> 312 pseudo_binary_subj_312   B    FALSE
#> 313 pseudo_binary_subj_313   B    FALSE
#> 314 pseudo_binary_subj_314   B    FALSE
#> 315 pseudo_binary_subj_315   B    FALSE
#> 316 pseudo_binary_subj_316   B    FALSE
#> 317 pseudo_binary_subj_317   B    FALSE
#> 318 pseudo_binary_subj_318   B    FALSE
#> 319 pseudo_binary_subj_319   B    FALSE
#> 320 pseudo_binary_subj_320   B    FALSE
#> 321 pseudo_binary_subj_321   B    FALSE
#> 322 pseudo_binary_subj_322   B    FALSE
#> 323 pseudo_binary_subj_323   B    FALSE
#> 324 pseudo_binary_subj_324   B    FALSE
#> 325 pseudo_binary_subj_325   B    FALSE
#> 326 pseudo_binary_subj_326   B    FALSE
#> 327 pseudo_binary_subj_327   B    FALSE
#> 328 pseudo_binary_subj_328   B    FALSE
#> 329 pseudo_binary_subj_329   B    FALSE
#> 330 pseudo_binary_subj_330   B    FALSE
#> 331 pseudo_binary_subj_331   B    FALSE
#> 332 pseudo_binary_subj_332   B    FALSE
#> 333 pseudo_binary_subj_333   B    FALSE
#> 334 pseudo_binary_subj_334   B    FALSE
#> 335 pseudo_binary_subj_335   B    FALSE
#> 336 pseudo_binary_subj_336   B    FALSE
#> 337 pseudo_binary_subj_337   B    FALSE
#> 338 pseudo_binary_subj_338   B    FALSE
#> 339 pseudo_binary_subj_339   B    FALSE
#> 340 pseudo_binary_subj_340   B    FALSE
#> 341 pseudo_binary_subj_341   B    FALSE
#> 342 pseudo_binary_subj_342   B    FALSE
#> 343 pseudo_binary_subj_343   B    FALSE
#> 344 pseudo_binary_subj_344   B    FALSE
#> 345 pseudo_binary_subj_345   B    FALSE
#> 346 pseudo_binary_subj_346   B    FALSE
#> 347 pseudo_binary_subj_347   B    FALSE
#> 348 pseudo_binary_subj_348   B    FALSE
#> 349 pseudo_binary_subj_349   B    FALSE
#> 350 pseudo_binary_subj_350   B    FALSE
#> 351 pseudo_binary_subj_351   B    FALSE
#> 352 pseudo_binary_subj_352   B    FALSE
#> 353 pseudo_binary_subj_353   B    FALSE
#> 354 pseudo_binary_subj_354   B    FALSE
#> 355 pseudo_binary_subj_355   B    FALSE
#> 356 pseudo_binary_subj_356   B    FALSE
#> 357 pseudo_binary_subj_357   B    FALSE
#> 358 pseudo_binary_subj_358   B    FALSE
#> 359 pseudo_binary_subj_359   B    FALSE
#> 360 pseudo_binary_subj_360   B    FALSE
#> 361 pseudo_binary_subj_361   B    FALSE
#> 362 pseudo_binary_subj_362   B    FALSE
#> 363 pseudo_binary_subj_363   B    FALSE
#> 364 pseudo_binary_subj_364   B    FALSE
#> 365 pseudo_binary_subj_365   B    FALSE
#> 366 pseudo_binary_subj_366   B    FALSE
#> 367 pseudo_binary_subj_367   B    FALSE
#> 368 pseudo_binary_subj_368   B    FALSE
#> 369 pseudo_binary_subj_369   B    FALSE
#> 370 pseudo_binary_subj_370   B    FALSE
#> 371 pseudo_binary_subj_371   B    FALSE
#> 372 pseudo_binary_subj_372   B    FALSE
#> 373 pseudo_binary_subj_373   B    FALSE
#> 374 pseudo_binary_subj_374   B    FALSE
#> 375 pseudo_binary_subj_375   B    FALSE
#> 376 pseudo_binary_subj_376   B    FALSE
#> 377 pseudo_binary_subj_377   B    FALSE
#> 378 pseudo_binary_subj_378   B    FALSE
#> 379 pseudo_binary_subj_379   B    FALSE
#> 380 pseudo_binary_subj_380   B    FALSE
#> 381 pseudo_binary_subj_381   B    FALSE
#> 382 pseudo_binary_subj_382   B    FALSE
#> 383 pseudo_binary_subj_383   B    FALSE
#> 384 pseudo_binary_subj_384   B    FALSE
#> 385 pseudo_binary_subj_385   B    FALSE
#> 386 pseudo_binary_subj_386   B    FALSE
#> 387 pseudo_binary_subj_387   B    FALSE
#> 388 pseudo_binary_subj_388   B    FALSE
#> 389 pseudo_binary_subj_389   B    FALSE
#> 390 pseudo_binary_subj_390   B    FALSE
#> 391 pseudo_binary_subj_391   B    FALSE
#> 392 pseudo_binary_subj_392   B    FALSE
#> 393 pseudo_binary_subj_393   B    FALSE
#> 394 pseudo_binary_subj_394   B    FALSE
#> 395 pseudo_binary_subj_395   B    FALSE
#> 396 pseudo_binary_subj_396   B    FALSE
#> 397 pseudo_binary_subj_397   B    FALSE
#> 398 pseudo_binary_subj_398   B    FALSE
#> 399 pseudo_binary_subj_399   B    FALSE
#> 400 pseudo_binary_subj_400   B    FALSE