diff --git a/DESCRIPTION b/DESCRIPTION index f733835..e04a4b8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: xpose4 Title: Tools for Nonlinear Mixed-Effect Model Building and Diagnostics -Version: 4.6.0.9002 +Version: 4.6.1 Authors@R: c(person("Andrew C.","Hooker",role=c("aut","cre","cph"),email="andrew.hooker@farmbio.uu.se"), person("Mats O.","Karlsson",role=c("aut","cph")), person("Justin J.","Wilkins",role="aut"), diff --git a/R/xpose.gam.R b/R/xpose.gam.R index 4749201..254b3ce 100644 --- a/R/xpose.gam.R +++ b/R/xpose.gam.R @@ -37,7 +37,11 @@ #' @param excl4 Covariate exclusion from model 4. #' @param extra Extra exclusion criteria. #' @param \dots Used to pass arguments to more basic functions. -#' @return Returned is a \code{\link[gam]{step.gam}} object +#' @return Returned is a \code{\link[gam]{step.Gam}} object. In this object +#' the step-wise-selected model is returned, with up to two additional +#' components. There is an "anova" component +#' corresponding to the steps taken in the search, as well as a +#' "keep" component if the "keep=" argument was supplied in the call. #' @author E. Niclas Jonsson, Mats Karlsson, Andrew Hooker & Justin Wilkins #' @seealso \code{\link[gam]{step.gam}} #' @examples @@ -278,16 +282,20 @@ xpose.gam <- ## if(!is.null(steppit)){ if(is.null(disp)){ - if(packageVersion("gam") >= "1.9.1"){ - nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep) + if(packageVersion("gam") >= "1.15"){ + nose1.parm <- step.Gam(bam.start, trace = trace, scope, keep = bam.keep) + } else if(packageVersion("gam") >= "1.9.1"){ + nose1.parm <- do.call("step.gam", list(bam.start, trace = trace, scope, keep = bam.keep)) } else { - nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep.old.gam) + nose1.parm <- do.call("step.gam", list(bam.start, trace = trace, scope, keep = bam.keep.old.gam)) } } else { - if(packageVersion("gam") >= "1.9.1"){ - nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep,scale=disp2) + if(packageVersion("gam") >= "1.15"){ + nose1.parm <- step.Gam(bam.start, trace = trace, scope, keep = bam.keep,scale=disp2) + } else if(packageVersion("gam") >= "1.9.1"){ + nose1.parm <- do.call("step.gam",list(bam.start, trace = trace, scope, keep = bam.keep,scale=disp2)) } else { - nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep.old.gam,scale=disp2) + nose1.parm <- do.call("step.gam",list(bam.start, trace = trace, scope, keep = bam.keep.old.gam,scale=disp2)) } } } else { diff --git a/data/simpraz.xpdb.old.RData b/data/simpraz.xpdb.old.RData deleted file mode 100644 index f16d951..0000000 Binary files a/data/simpraz.xpdb.old.RData and /dev/null differ diff --git a/man/xpose.gam.Rd b/man/xpose.gam.Rd index 5918b00..0ad4726 100644 --- a/man/xpose.gam.Rd +++ b/man/xpose.gam.Rd @@ -89,7 +89,11 @@ be used.} \item{\dots}{Used to pass arguments to more basic functions.} } \value{ -Returned is a \code{\link[gam]{step.gam}} object +Returned is a \code{\link[gam]{step.Gam}} object. In this object +the step-wise-selected model is returned, with up to two additional +components. There is an "anova" component +corresponding to the steps taken in the search, as well as a +"keep" component if the "keep=" argument was supplied in the call. } \description{ Function takes an Xpose object and performs a generalized additive model