This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
dec_labs = c("E = Escalate to the next higher dose", | |
"S = Stay at the current dose", | |
"D = De-escalate to the next lower dose", | |
"DE = De-escalate and eleminate the current and higher doses") | |
#cf BOIN design |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Extention de [blockrand::blockrand] | |
#' | |
#' @param n_arm nombre de patient par bras | |
#' @param levels vecteur de bras de traitement | |
#' @param strata liste contenant les facteurs de stratification | |
#' @param block.sizes tailles de bloc possible (multiple du nombre de bras) | |
#' @param ... passé à [blockrand::blockrand] | |
#' | |
#' @author Dan Chaltiel (30/06/2023) | |
#' @return une tibble |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!require(tidyverse) || !require(xml2)){ | |
stop("Packages `tidyverse` and `xml2` are required for read_nquery() to work.\n", | |
'Please run `install.packages(c("tidyverse", "xml2", "devtools"))` before trying again.') | |
} | |
#' Read nQuery files | |
#' | |
#' @param file the `.nqt` file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Extension ofTarleb's answer on Stackoverflow (https://stackoverflow.com/a/52131435/3888000) to include docx section ends with portrait/landscape orientation changes. | |
-- Also uses officer package syntax to create sections breaks | |
local function newpage(format) | |
if format == 'docx' then | |
local pagebreak = '<w:p><w:r><w:br w:type="page"/></w:r></w:p>' | |
return pandoc.RawBlock('openxml', pagebreak) | |
else | |
return pandoc.Para{pandoc.Str '\f'} |