Helmut
★★★
avatar
Homepage
Vienna, Austria,
2014-09-28 22:50
(3863 d 18:33 ago)

Posting: # 13608
Views: 8,212
 

 Can’t run package bear [🇷 for BE/BA]

Dear all (and especially Yung-jin),

since a while I can’t run bear any more. First I thought the cause was my old XP-machine, but same story on Win­ 7 (64 bit). While loading gdata complains about a missing Perl-interpreter. I did/got:

library(bear)
Loading required package: reshape
Loading required package: nlme
Loading required package: gdata
gdata: Unable to locate valid perl interpreter
gdata:
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata:
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.

gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.

gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.


Attaching package: ‘gdata’

The following object is masked from ‘package:stats’:

    nobs

The following object is masked from ‘package:utils’:

    object.size


....................................

   bear (BE/BA for R)
   v2.6.3
   under license of GPL-2|GPL-3
                               
   Please type 'go()' to run; or
   'about.bear()' to read more.

....................................


If I ignore gdata’s warnings (don’t want to import Excel-files anyway) and type go() the splash screen appears for a few seconds, closes, and the console tells me:
Error in gzfile(file, mode) : cannot open the connection

For R-freaks:
sysname        "Windows"
release        "7 x64"
version        "build 7601, Service Pack 1"
machine        "x86-64"
platform       "x86_64-w64-mingw32"
version.string "R version 3.1.1 (2014-07-10)"


Any ideas?


Edit: Checked on my 32-bit Vista notebook. Same complaints from gdata(), but bear() continues to work. Strange.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2014-09-29 00:34
(3863 d 16:49 ago)

@ Helmut
Posting: # 13609
Views: 6,953
 

 Need a Strawberry?

Dear Helmut,

[...]

gdata:

gdata: read.xls() will be unable to read Excel XLS and XLSX files

gdata: unless the 'perl=' argument is used to specify the location of a

gdata: valid perl intrpreter. [...]


You will need to install free Strawberry Perl to solve these errors. But you are right. It is not necessary AFAIK. It should be able to run bear without installing Strawberry Perl. But I do install Strawberry Perl on my PC (Win7, x64). There is no need to do this on other platforms, such as linux PC or iMac. That means perl library/interpreter has been bundled with these OS.

❝ If I ignore gdata’s warnings (don’t want to import Excel-files anyway) and type go() the splash screen appears for a few seconds, closes, and the console tells me:

Error in gzfile(file, mode) : cannot open the connection


Hmm... I really have no idea so far. Let's see if you can solve the problem after installing Strawberry Perl. I never see such an error message before.

All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2014-09-29 06:05
(3863 d 11:17 ago)

@ yjlee168
Posting: # 13613
Views: 7,028
 

 Need a Strawberry?

Dear Yung-jin,

❝ You will need to install free Strawberry Perl to solve these errors. But you are right. It is not necessary AFAIK. It should be able to run bear without installing Strawberry Perl.


Hhm. After adding Strawberry Perl’s 5.20.1.1 (64-bit) 14,145 files in 1,657 folders (391 MB in total) I got

Loading required package: gdata
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.


Hurrah! But wait a minute:

❝ ❝ Error in gzfile(file, mode) : cannot open the connection


❝ Hmm... I really have no idea so far. Let's see if you can solve the problem after installing Strawberry Perl. I never see such an error message before.


Still there… If I google that I don’t understand what the linked pages try to tell me. :confused:

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2014-09-29 11:19
(3863 d 06:03 ago)

(edited on 2014-09-29 16:36)
@ Helmut
Posting: # 13614
Views: 6,953
 

 Need a Strawberry?

Dear Helmut,

It might be caused by the differences of setup files due to version transition from previous one. I have tried to take care all these possible errors. But it looks like that I probably still miss something there. Please try to delete all setup files (incl. plot.setup.rds and bear.setup.rds) from your working directory (type getwd() under R console to find out where it is). Then run bear again. Bear will create all new setup files (with default settings) automatically for you if these setup files do not exist at the beginning. Hope this can solve the problem.

❝ [...]

❝ Hurrah! But wait a minute:

❝ [...]

❝ Still there… If I google that I don’t understand what the linked pages try to tell me. :confused:


Me either.

All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2014-09-29 15:31
(3863 d 01:52 ago)

@ yjlee168
Posting: # 13616
Views: 6,937
 

 Permission issues (resolved)

Dear Yung-jin,

it was a permission issue. See the steps I have taken. Maybe it helps others.
  • I always install/update R and all packages as admin in order to avoid a personal library folder (this was the main cause, I guess).
  • Just to be sure deleted bear from the library-folder and installed new from CRAN.
  • Firing up R with user-rights
    library(bear)
    go()

  • Same error.
  • getwd() returns a path which requires admin-permissions. A search for *.setup.rds returns nothing. Ha-ha! R/bear couldn’t write the setup-files.
  • In the R-console setwd("dir"), where dir is the full path including to a writable folder.
  • go()
  •                  Methods Setting                  which_is
    1              run demo?       0                        no
    2          study design?       0           2x2x2 crossover
    3  single-/multiple-dose       0               single-dose
    4      lambda_z estimate       0          adj. R sq. (ARS)
    5        trapezoidal AUC       0        linear-up/log-down
    6      BE criterion (LL)      80               lower limit
    7                   ODA?       0                        no
    8                  dose?  100000                dose given
    9        dosing interval      24       *multiple-dose only
    10                 Tlast     120       *multiple-dose only
    11                 pAUC?       0                   all AUC
    12            pAUC_start     121 the starting time of pAUC
    13              pAUC_end     128      the end time of pAUC
    14           IDP output?       0                        no

     The plot label of x-axis -> Time after Dosing (hr)
      and the label of y-axis -> DrugX Plasma Conc. (ng/mL)
     --------------------------------------------------------

  • Bingo!

BTW, can you check whether you are able to login with your new IP?

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2014-09-29 18:56
(3862 d 22:27 ago)

@ Helmut
Posting: # 13618
Views: 6,871
 

 Permission issues (resolved)

Dear Helmut,

❝ it was a permission issue.[...]


getwd() returns a path which requires admin-permissions. A search for *.setup.rds returns nothing. Ha-ha!


Great. That makes sense to me. I will see if I can do something to detect the writing permission with default working directory when loading bear later. But cannot guarantee that it can definitely be solved.

❝ [...]


❝ BTW, can you check whether you are able to login with your new IP?


I will try to login tomorrow. Many thanks.

All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,667 registered users;
29 visitors (0 registered, 29 guests [including 7 identified bots]).
Forum time: 17:23 CEST (Europe/Vienna)

It is true that many scientists are not philosophically minded
and have hitherto shown much skill and ingenuity
but little wisdom.    Max Born

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