Open keikeisusu opened 1 month ago
I think I know why this is happening, but the line that may raise that error seems to be left out of the script here. I think you may be trying to read/print the DB-error without identifying the proper location to look for the value. To access the DB-error value, try the following:
DBerr <- as.numeric(cea_des$db_err)
This will store the error value in DBerr
which you can then print, round, etc. For simplicity, I would also recommend rounding the error:
RoundedDBerror <- round(Dberr, 2)
I'm using version 0.4.0 of cbcTools, which at the time I designed my DCE was the most recent version. If you are using a different version, your results may vary. That said, when I ran the script you provided here, no errors were raised and everything worked as expected.
Thanks, mmardehali!
I'm using ver. 0.5.2 . The returned object from cbc_design
is a data.frame, not a list, regardless of the value for keep_db_error
.
I tried running the same code as above with v 0.4.0, as you said, it worked.
In addition, the object is indeed a list.
Although I've not scrutinized the source code here, it seems the lines 871-873 don't function.
Hi! I'm trying to make a series of designs with
cbc_design
to pick ones with small DB-error. But whenkeep_db_error = TRUE
, the function returns the error as below:Does anyone know how to deal with this?
Thanks in advance!