Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bind_rows_0

Bind rows of multiple data frames with zero fill


Description

A version of bind_rows out of dplyr that fills non-common columns with zeroes instead of NA. Gives an error if any of the input data contains NA already.

Usage

bind_rows_0(...)

Arguments

...

Data frames to combine, passed into bind_rows (see dplyr documentation)

Examples

## Setting up dummy sampling for fast execution of example
## Please use 4 chains and 100x more warmup & iter in practice
.user_mc_options <- options(OncoBayes2.MC.warmup=10, OncoBayes2.MC.iter=20, OncoBayes2.MC.chains=1)

library(tibble)

dose_info_A <- tibble(
   group_id = "hist_A",
   drug_A = 1
 )

 dose_info_B <- tibble(
   group_id = "hist_B",
   drug_B = 100 * (1:2)
 )

bind_rows_0(dose_info_A, dose_info_B)

## Recover user set sampling defaults
options(.user_mc_options)

OncoBayes2

Bayesian Logistic Regression for Oncology Dose-Escalation Trials

v0.7-0
GPL (>= 3)
Authors
Novartis Pharma AG [cph], Sebastian Weber [aut, cre], Lukas A. Widmer [aut], Andrew Bean [aut], Trustees of Columbia University [cph] (R/stanmodels.R, configure, configure.win)
Initial release
2021-05-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.