Artem Gusev
☆    

Russia, Moscow,
2017-04-28 13:22
(2526 d 09:19 ago)

Posting: # 17276
Views: 8,501
 

 Difficulties with run NCA in BEAR [🇷 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
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2017-04-29 21:47
(2525 d 00:55 ago)

(edited by yjlee168 on 2017-04-30 19:41)
@ Artem Gusev
Posting: # 17282
Views: 7,803
 

 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
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Artem Gusev
☆    

Russia, Moscow,
2017-05-02 11:56
(2522 d 10:46 ago)

@ yjlee168
Posting: # 17289
Views: 7,602
 

 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
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2017-05-03 21:56
(2521 d 00:45 ago)

@ Artem Gusev
Posting: # 17301
Views: 7,558
 

 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
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Artem Gusev
☆    

Russia, Moscow,
2017-05-06 09:56
(2518 d 12:46 ago)

@ yjlee168
Posting: # 17307
Views: 7,507
 

 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
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2017-05-06 19:50
(2518 d 02:51 ago)

@ Artem Gusev
Posting: # 17311
Views: 7,444
 

 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
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
mahmoud-teaima
★    

2017-05-18 20:58
(2506 d 01:44 ago)

@ yjlee168
Posting: # 17368
Views: 7,264
 

 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.
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2017-05-18 23:48
(2505 d 22:54 ago)

@ mahmoud-teaima
Posting: # 17369
Views: 7,372
 

 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
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
mahmoud-teaima
★    

2017-05-20 12:32
(2504 d 10:10 ago)

@ yjlee168
Posting: # 17376
Views: 7,129
 

 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.
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2017-05-20 21:43
(2504 d 00:58 ago)

@ mahmoud-teaima
Posting: # 17378
Views: 7,183
 

 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
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,636 registered users;
82 visitors (0 registered, 82 guests [including 8 identified bots]).
Forum time: 21:42 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