[Genabel-commits] r935 - in pkg/PredictABEL: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Aug 2 17:39:05 CEST 2012
Author: lckarssen
Date: 2012-08-02 17:39:03 +0200 (Thu, 02 Aug 2012)
New Revision: 935
Added:
pkg/PredictABEL/R/evalCall.R
Modified:
pkg/PredictABEL/DESCRIPTION
pkg/PredictABEL/NAMESPACE
pkg/PredictABEL/R/PredictABEL.R
Log:
In PredictABEL:
Biggest change is to try to remove the dependency on the PBSmodelling package. This needs to be tested, though. The package now builds OK, only two warnings when running R CMD check.
- DESCRIPTION:
+ Removed PBSmodelling from the list of dependencies
+ At request of prof. Ripley use only one maintainer
- NAMESPACE: removed PBSmodelling
- R/PredictABEL.R and R/evalCall.R:
- Removed the call to resetGraph() from PBSmodelling. I don't think we need it, but more testing is needed.
- For now I copied the source code from the evalCall() function directly from the PBSmodelling source. This is OK, since we both are GPLv2. In a future release we should try to rewrite the plotPredictivenessCurve() function.
Modified: pkg/PredictABEL/DESCRIPTION
===================================================================
--- pkg/PredictABEL/DESCRIPTION 2012-07-30 08:24:11 UTC (rev 934)
+++ pkg/PredictABEL/DESCRIPTION 2012-08-02 15:39:03 UTC (rev 935)
@@ -1,11 +1,10 @@
Package: PredictABEL
Title: Assessment of risk prediction models
-Version: 1.2-1
-Date: 2012-07-22
+Version: 1.2-2
+Date: 2012-08-02
Author: Suman Kundu, Yurii S. Aulchenko, A. Cecile J.W. Janssens
-Maintainer: Suman Kundu <s.kundu at erasmusmc.nl>, A. Cecile J.W. Janssens
- <a.janssens at erasmusmc.nl>
-Depends: R (>= 2.12.0), Hmisc, ROCR, epitools, PBSmodelling
+Maintainer: Suman Kundu <s.kundu at erasmusmc.nl>
+Depends: R (>= 2.12.0), Hmisc, ROCR, epitools
Suggests: GenABEL
Description: PredictABEL includes functions to assess the performance of
risk models. The package contains functions for the various measures that are
@@ -21,8 +20,8 @@
logistic regression analysis. These logistic regression functions are
specifically written for models that include genetic variables, but they
can also be applied to models that are based on non-genetic risk factors only.
- Finally, the package includes function to construct a simulated dataset with
- genotypes, genetic risks, and disease status for a hypothetical population, which
+ Finally, the package includes function to construct a simulated dataset with
+ genotypes, genetic risks, and disease status for a hypothetical population, which
is used for the evaluation of genetic risk models.
License: GPL (>= 2)
URL: http://www.genabel.org/packages/PredictABEL
Modified: pkg/PredictABEL/NAMESPACE
===================================================================
--- pkg/PredictABEL/NAMESPACE 2012-07-30 08:24:11 UTC (rev 934)
+++ pkg/PredictABEL/NAMESPACE 2012-08-02 15:39:03 UTC (rev 935)
@@ -8,6 +8,5 @@
import(
Hmisc,
ROCR,
- epitools,
- PBSmodelling
+ epitools
)
Modified: pkg/PredictABEL/R/PredictABEL.R
===================================================================
--- pkg/PredictABEL/R/PredictABEL.R 2012-07-30 08:24:11 UTC (rev 934)
+++ pkg/PredictABEL/R/PredictABEL.R 2012-08-02 15:39:03 UTC (rev 935)
@@ -1187,8 +1187,6 @@
"plotPredictivenessCurve" <-
function(predrisk, rangeyaxis, labels, plottitle, xlabel, ylabel, fileplot, plottype)
{
- require(PBSmodelling)
-
if (missing(plottitle)) {plottitle <- "Predictiveness curve"}
if (missing(xlabel)) {xlabel <- "Cumulative percentage"}
if (missing(ylabel)) {ylabel <- "Predicted risks"}
@@ -1210,7 +1208,6 @@
y <- (1:n)/n
z <- y >= ylim[1] & y <= ylim[2]
- resetGraph()
evalCall(plot,
argu = list(x = y[z], y = x[z], type = "n",
xlab = "", ylab = "", las = 1, mgp = c(0, 0.6, 0),
Added: pkg/PredictABEL/R/evalCall.R
===================================================================
--- pkg/PredictABEL/R/evalCall.R (rev 0)
+++ pkg/PredictABEL/R/evalCall.R 2012-08-02 15:39:03 UTC (rev 935)
@@ -0,0 +1,55 @@
+## The following function was copied from the PBSmodelling R
+## package version 2.64 (downloaded on 2012-08-01 from SVN:
+## http://pbs-modelling.googlecode.com/svn/trunk).
+## The PBSModelling package is has a GPL v2 (or higher) licence
+## according to the DESCRIPTION file, so we can use this copy without
+## problem.
+##
+## Since this is the only part of PBSmodelling PredictABEL depends on,
+## this is the smartest way to remove the PBSmodelling dependency
+## (which itself drags in TCL/TK and other deps at the OS level.)
+##
+## 2012-08-02 L.C. Karssen.
+
+
+##================================================|
+## PBS Modelling |
+## Support functions (in alphabetic order)--------|
+## Authors: |
+## Jon T. Schnute <Jon.SchnuteJ at dfo-mpo.gc.ca> |
+## Alex Couture-Beil <alex at mofo.ca> |
+## Rowan Haigh <Rowan.HaighR at dfo-mpo.gc.ca> |
+## Anisa Egeli <> |
+##================================================|
+#
+##evalCall-------------------------------2009-03-03
+## Evaluates a function call, resolving conflicting arguments.
+##-----------------------------------------------RH
+evalCall=function(fn,argu,...,envir=parent.frame(),checkdef=FALSE,checkpar=FALSE){
+ fnam=as.character(substitute(fn))
+ fnam.def=paste(fnam,"default",sep=".")
+ base=formals(fnam)
+ if (checkdef && exists(fnam.def)) {
+ defs=formals(fnam.def)
+ udefs=defs[setdiff(names(defs),names(base))]
+ base=c(base,udefs) }
+ base=base[setdiff(names(base),"...")]
+ if (checkpar) {
+ pars=par(); pars=pars[setdiff(names(pars),names(base))] # use only pars not in base
+ forms=c(base,pars) } # all possible formal arguments
+ else forms=base
+#if (fnam=="axis") {browser();return()}
+ #forms=NULL
+ #for (i in names(base)) forms[[i]]=get(i,envir=envir)
+ dots=list(...)
+ argus=argu[setdiff(names(argu),names(dots))]
+ given=c(argus,dots)
+ allow=given[intersect(names(given),names(forms))]
+ strargs=sapply(allow,deparse,width.cutoff=500,simplify=FALSE)
+ strargs=sapply(strargs,paste,collapse="",simplify=FALSE) # collapse multiple strings
+ argspec=character(0)
+ for (i in names(strargs)) argspec=c(argspec,paste(i,"=",strargs[[i]]))
+ expr=paste(fnam,"(",paste(argspec,collapse=","),")",sep="")
+ eval(parse(text=expr))
+ invisible(expr) }
+#-----------------------------------------evalCall
More information about the Genabel-commits
mailing list