Helmut
★★★
avatar
Homepage
Vienna, Austria,
2012-10-01 22:12
(4218 d 20:13 ago)

Posting: # 9292
Views: 7,557
 

 MATOST [🇷 for BE/BA]

Dear [image]Users,

found an interesting paper:

Zheng C, Wang J, Zhao L. Testing bioequivalence for multiple formulations with power and sample size calculations. Pharmaceut Stat. 2012;11(4):334–41. doi:10.1002/pst.1522


The authors published a package “MATOST” (zip-file, manual, and source code here). After updating/installing required packages from CRAN (MASS, MCMCpack, mvtnorm, cubature, R2Cuba) I tried to install MATOST from the local zip. I got:

Loading required package: MASS
Loading required package: MCMCpack
Loading required package: coda
Loading required package: lattice
##
## Markov Chain Monte Carlo Package (MCMCpack)
## Copyright (C) 2003-2012 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
##
## Support provided by the U.S. National Science Foundation
## (Grants SES-0350646 and SES-0350613)
##
Loading required package: mvtnorm
Loading required package: cubature
Loading required package: R2Cuba
Error in library(pkg, character.only = TRUE) :
  package ‘MATOST’ does not have a NAMESPACE and should be re-installed

OK, why not. Both rm(list=ls(all=TRUE)) / re-install and a second try in a new R-session (new download; checked for binary identity) gave the same error. Before I contact the authors can someone of you give it a try? THX.

@Detlew: I think you experienced a similar namespace-issue with randomizeBE? MATOST was built under 2.11.1 and I’m testing with 2.15.1. AFAIK all packages must have a namespace since 2.14.0.

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
d_labes
★★★

Berlin, Germany,
2012-10-02 16:06
(4218 d 02:19 ago)

@ Helmut
Posting: # 9296
Views: 6,225
 

 Namespace issues

Dear R-user Helmut,

❝ @Detlew: I think you experienced a similar namespace-issue with randomizeBE?


Not really. The first version of randomizeBE was built under 2.15.0 if I remember right.
I had the issue that hidden (internal) functions beginning with a period (f.i. .xyz()) were no longer accessible from outside after introducing a NAMSPACE in PowerTOST.

MATOST was built under 2.11.1 and I’m testing with 2.15.1. AFAIK all packages must have a namespace since 2.14.0.


Totally right. The author(s) / maintainer(s) have to rebuild the package with a namespace. If they had submitted their package on CRAN a standard namespace had been added by default by CRAN.

If you can't get help from the author(s) try the workaround found here:
http://stackoverflow.com/questions/8012596/error-with-asreml-d-package-in-r-2-14-0/8014357#8014357
or :google: "package does not have a NAMESPACE and should be re-installed".

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2012-10-02 16:34
(4218 d 01:51 ago)

@ d_labes
Posting: # 9297
Views: 6,446
 

 THX; workaround

Dear Detlew!

Thanks for the link. I hacked the namespace and updated the MD5. Installation works now:

utils:::menuInstallLocal()
package ‘MATOST’ successfully unpacked and MD5 sums checked

If you are interested: download. I will contact the authors anyhow, since none of the examples in the help-file work; all functions are missing. :-(


Edit: Cheng suggested to download the source-code and compile it locally. I was not in the mood for that. Workaround (slow, since not compiled):
  1. Download the hacked zip file
  2. In R: Install packages(s) from local zip files …
  3. Download the source code here
  4. Unzip to an empty folder (e.g., to C:\TEMP)
  5. Return to the R-session, File > Source R code…
  6. In the new window [Select file to source] navigate to C:\TEMP\MATOST\R\, select tost_power_fcn
  7. R should display:
    source("C:\\TEMP\\MATOST\\R\\tost_power_fcn.r")
Now the functions are available and examples from the help file are working (patience – slow).

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
UA Flag
Activity
 Admin contact
22,988 posts in 4,825 threads, 1,655 registered users;
63 visitors (0 registered, 63 guests [including 4 identified bots]).
Forum time: 18:25 CEST (Europe/Vienna)

The whole purpose of education is
to turn mirrors into windows.    Sydney J. Harris

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