about package randomizeBE [🇷 for BE/BA]

posted by yjlee168 Homepage – Kaohsiung, Taiwan, 2019-08-19 14:14 (1683 d 00:08 ago) – Posting: # 20502
Views: 5,501

Dear Detlew and all others,

I recently tried to re-write GUI for your developed R package randomizeBE. And I got some error messages about the function sequences. Here is what I got
require("randomizeBE")
tmts<- c("R","T")
tmts
[1] "R" "T"
sequences("parallel", tmts=tmts)
Error in if (!is.null(tmts) & length(tmts) != ntmt) { :
  missing value where TRUE/FALSE needed
In addition: Warning message:
In sequences("parallel", tmts = tmts) : NAs introduced by coercion

sequences
function (design, tmts = NULL)
{
    seqs <- character()
    ntmt <- as.numeric(substr(design, 1, 1))           ### Q1: if this works for design=="parallel" too?
    if (!is.null(tmts) & length(tmts) != ntmt) {
        stop("Treatment codes must have ", ntmt, " entries!")
    }
    if (design == "2x2" | design == "2x2x2")
        seqs <- c("AB", "BA")
    if (design == "parallel")                          ### Q2: not working if tmts=c("R","T")?
        seqs <- c("A", "B")
    if (design == "3x3" | design == "3x3x3") {
        seqs <- c("ABC", "BCA", "CAB")
        seqs <- randLS(seqs)
...
}
sequences("parallel")
[1] "A" "B"
Warning message:
In sequences("parallel") : NAs introduced by coercion  ### Q3: is this warning message normal?
sequences("parallel", tmts=c("R","T1","T2"))           ### Q4: not implemented yet for this?
Error in if (!is.null(tmts) & length(tmts) != ntmt) { :
  missing value where TRUE/FALSE needed
In addition: Warning message:
In sequences("parallel", tmts = c("R", "T1", "T2")) :
  NAs introduced by coercion


Thanks in advanced.

All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here

Complete thread:

UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,639 registered users;
83 visitors (0 registered, 83 guests [including 3 identified bots]).
Forum time: 13:23 CET (Europe/Vienna)

Nothing shows a lack of mathematical education more
than an overly precise calculation.    Carl Friedrich Gauß

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5