Bioequivalence and Bioavailability Forum

Main page Policy/Terms of Use Abbreviations Latest Posts

 Log-in |  Register |  Search

Back to the forum  Query: 2017-08-21 12:04 CEST (UTC+2h)
 
Artem Gusev
Junior

Russia, Moscow,
2017-04-28 11:22

Posting: # 17276
Views: 1,456
 

 Difficulties with run NCA in BEAR [R for BE/BA]

Dear all!

I've installed the package Bear 2.7.8 in R 3.4.0 for Windows 7 (x64) with preinstall sсript with additional libraries, Java etc. Next, I've started demo-run (2*2*2 NCA and Statistics) and it was OK. Then I've prepared a suitable dataset, entered the dose and chose "RUN". After successful data import, when program switched to NCA, I've got the following error:

Error in if (Dose <= 0) Dose <- 0 else Dose <- as.numeric(Dose) : missing value, must be TRUE/FALSE

It seems that Dose value wasn't importing correctly. Also I've noticed that every time the package was run, the dose value was "NA".

I will be grateful for any help with solving this problem.

Best Regards,
Artem
yjlee168
Senior
Homepage
Kaohsiung, Taiwan,
2017-04-29 19:47
(edited by yjlee168 on 2017-04-30 19:41)

@ Artem Gusev
Posting: # 17282
Views: 1,232
 

 Difficulties with run NCA in BEAR

Dear Artem,

Sorry about the delay of this response. I just run bear as you did and did not find the same problem. I know that saveRDS() in GUI can be weird. The error you had was because saveRDS() did not work properly. It failed to save the Dose. You can try following codes under R console:
x<- readRDS("bearGUI.setup.rds")
x
                  Methods                Setting
1               run demo?                      0
2            study design                      0
3   single-/multiple-dose                      0
4       lambda_z estimate                      0
5         trapezoidal AUC                      0
6       BE criterion (LL)                     80
7                     ODA                      0
8            dose (in mg)                     80  <-- is it 'NA' or ''?
9         dosing interval                     24
10                  Tlast                    120
11                   pAUC                      0
12             pAUC_start                    121
13               pAUC_end                    128
14         indivDP_output                      0
15 drug plasma conc. unit                      1
16       is a metabolite?                      0
17           x-axis label Time after dosing (hr)
18           y-axis label     drugX plasma conc.
19         analysis types                      0
20       data file format                      0
21              Tmax_stat                      1

If the dose is 'NA' or '', it means that saveRDS() fails to save the value. Why did this happen? I don't have a clue right now. You can try the following steps to see if the error goes away.
  1. delete the set up file (i.e., bearGUI.setup.rds) from your working directory. And run bear again; If this still cannot work correctly, please try the next step.
  2. run the following codes under R console without GUI:
    library(bear)
    require(rChoiceDialogs)
    x<- readRDS("bearGUI.setup.rds")
    x<- edit (x)  ### correct (edit) the dose and other parameter values if necessary
    saveRDS(x,"bearGUI.setup.rds")           ### save your setup
    xxdf<- "";psdp<- ""                      ### leave the line as it is
    xxdf<- rchoose.files(filters="*.csv")    ### supposed that your data file is a csv format
    go2menu(xxdf,psdp)                       ### leave the line as it is

    If this step still does not work (it should, I have already tested), please install the previous version of bear (v2.7.7) if you need a quick solution.
BTW, could you please tell me the information of your computer (CPU & RAM; my CPU is i7-6700 with 16 GB RAM) and platform (OS, mine is Windows 10 x64) that you use to run R/bear? Thanks in advanced and sorry about the error.

» Error in if (Dose <= 0) Dose <- 0 else Dose <- as.numeric(Dose) : missing value, must be TRUE/FALSE

All the best,
---Yung-jin Lee
[image]bear v2.8.3:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Download link (updated) -> here
Artem Gusev
Junior

Russia, Moscow,
2017-05-02 09:56

@ yjlee168
Posting: # 17289
Views: 1,163
 

 Difficulties with run NCA in BEAR

Dear, yjlee168!

You are totaly right. The RDS was:

> readRDS("bearGUI.setup.rds")
                  Methods                Setting
1               run demo?                      0
2            study design                      0
3   single-/multiple-dose                      0
4       lambda_z estimate                      0
5         trapezoidal AUC                      1
6       BE criterion (LL)                     80
7                     ODA                      0
8            dose (in mg)                   <NA>
9         dosing interval                     24
10                  Tlast                    120
11                   pAUC                      0
12             pAUC_start                    121
13               pAUC_end                    128
14         indivDP_output                      0
15 drug plasma conc. unit                      1
16       is a metabolite?                      0
17           x-axis label Time after dosing (hr)
18           y-axis label     drugX plasma conc.
19         analysis types                      0
20       data file format                      0
21              Tmax_stat                      0



Manual correcting of RDS solved the problem. Thanks alot for your code.

Also at your request: Intel Core i-5 2430M, 8GB RAM, Windows 7 x64, HDD and SSD.

Best Regards,
Artem
yjlee168
Senior
Homepage
Kaohsiung, Taiwan,
2017-05-03 19:56

@ Artem Gusev
Posting: # 17301
Views: 1,125
 

 error fixed in BEAR

Dear Artem,

I have fixed the error and have uploaded v2.7.9 to Sourceforge already. Sorry about this error and thank you so much for bringing up this issue on the Forum.

» Error in if (Dose <= 0) Dose <- 0 else Dose <- as.numeric(Dose) : missing value, must be TRUE/FALSE

All the best,
---Yung-jin Lee
[image]bear v2.8.3:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Download link (updated) -> here
Artem Gusev
Junior

Russia, Moscow,
2017-05-06 07:56

@ yjlee168
Posting: # 17307
Views: 1,041
 

 error fixed in BEAR

Dear yjlee168,

I've installed the latest version of package (2.8.0). Mentioned error is fixed.

Thank you for your project!

Best Regards,
Artem
yjlee168
Senior
Homepage
Kaohsiung, Taiwan,
2017-05-06 17:50

@ Artem Gusev
Posting: # 17311
Views: 1,038
 

 bear v2.8.1 released

Dear Artem,

I just uploaded bear v2.8.1 to Sourceforge. This may be the final release of bear for 2017. Have fun.

All the best,
---Yung-jin Lee
[image]bear v2.8.3:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Download link (updated) -> here
mahmoud-teaima
Regular

Cairo, Egypt,
2017-05-18 18:58

@ yjlee168
Posting: # 17368
Views: 813
 

 error with bear v2.8.2 running on R3.4.0 on macos 10.11.6 elcaptin

Dear YJ LEE,
Thanks for your effort handling many bugs encountered since the release of bear2.7.8 till bear2.8.2.
I succeeded to run bear2.8.2 on R3.4.0 on macos 10.11.6 elcaptin but during running the demo for testing i got the following error:
save all plots to a pdf file.
 It may take a while to complete.
 Please wait...
Error in grid.Call.graphics(C_setviewport, vp, TRUE) :
  non-finite location and/or size for viewport

Can you please, help with that?

P.S.
The X11 GUI got frozen after this error!!!!!
Greetings.

Mahmoud Teaima, PhD.
Assistant Professor at Department of Pharmaceutics and Industrial Pharmacy.
Vice-director at Center of Applied Research and Advanced Studies (CARAS).
Faculty of Pharmacy, Cairo University, Cairo, Egypt.
yjlee168
Senior
Homepage
Kaohsiung, Taiwan,
2017-05-18 21:48

@ mahmoud-teaima
Posting: # 17369
Views: 805
 

 error with bear v2.8.2 running on R3.4.0 on macos 10.11.6 elcaptin

Dear Dr. Teaima,

I am most afraid of taking question from iMac users, because I am not familiar with OSX at all. Do you run bear with RStudio? If yes, I may have the answer for your question. You need to maximize your Plots panel before running it. If you run bear without RStudio but with the terminal, then I don't know why it is so. I have a warning message about this when you open GUI on message logs window.

» save all plots to a pdf file.
» It may take a while to complete.
» Please wait...
» Error in grid.Call.graphics(C_setviewport, vp, TRUE) :
»   non-finite location and/or size for viewport

All the best,
---Yung-jin Lee
[image]bear v2.8.3:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Download link (updated) -> here
mahmoud-teaima
Regular

Cairo, Egypt,
2017-05-20 10:32

@ yjlee168
Posting: # 17376
Views: 719
 

 bear v2.8.2 running on R3.4.0 through RStudio on macos 10.12.5 sierra

Dear YJ Lee,

» I am most afraid of taking question from iMac users, because I am not familiar with OSX at all. Do you run bear with RStudio? If yes, I may have the answer for your question. You need to maximize your Plots panel before running it.

You are right, this error message popped out only under Rstudio but not Rterminal!!!!!.
sure, there should be a way out for this bug.

Many thanks for your advise.

Please, do your best for the max optimization and compatibility of bear with all platforms.

Good luck.

Greetings.

Mahmoud Teaima, PhD.
Assistant Professor at Department of Pharmaceutics and Industrial Pharmacy.
Vice-director at Center of Applied Research and Advanced Studies (CARAS).
Faculty of Pharmacy, Cairo University, Cairo, Egypt.
yjlee168
Senior
Homepage
Kaohsiung, Taiwan,
2017-05-20 19:43

@ mahmoud-teaima
Posting: # 17378
Views: 708
 

 always on my mind~

Dear Dr. Teaima,

It is not a bug (I think) because it did not happen to Windows plus RStudio. It occurred in Ubuntu/Linux or OSX (Unix-like?) plus RStudio. If it is a bug, it comes from RStudio. I just cannot help with it. Running bear with Rgui.exe or a terminal without RStudio on different platforms is just fine. I am thinking to turn screen plots off when running under RStudio, or to force to not allow users to run bear with RStudio. However it seems not to so fuzzy at all if I can remind users to maximize the window or view size of Plots panel under RStudio before running bear. So far, I cannot find a way to manipulate the window size of Plots panel from the code.

» Please, do your best for the max optimization and compatibility of bear with all platforms.

Yes, it's always on my mind.

BTW, if your OS is Windows, please run win.version() with Rgui.exe (R console) and under RStudio (currently it's v1.0.143). You can see the wired (or different) results. But RStudio denied this anyway.

All the best,
---Yung-jin Lee
[image]bear v2.8.3:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Download link (updated) -> here
Back to the forum Activity
 Thread view
Bioequivalence and Bioavailability Forum | Admin contact
17,225 Posts in 3,685 Threads, 1,056 registered users;
31 users online (0 registered, 31 guests).

The important thing in science is not so much to obtain new facts
as to discover new ways of thinking about them.    William Henry Bragg

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
XHTML/CSS RSS Feed