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

Posting: # 9292
Views: 8,854
 

 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
(4652 d 04:28 ago)

@ Helmut
Posting: # 9296
Views: 7,290
 

 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
(4652 d 04:00 ago)

@ d_labes
Posting: # 9297
Views: 7,407
 

 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
23,424 posts in 4,927 threads, 1,685 registered users;
93 visitors (0 registered, 93 guests [including 13 identified bots]).
Forum time: 20:34 CEST (Europe/Vienna)

Complex, statistically improbable things are by their nature
more difficult to explain than
simple, statistically probable things.    Richard Dawkins

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