[Analogue-commits] r207 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jan 29 00:32:36 CET 2011


Author: gsimpson
Date: 2011-01-29 00:32:36 +0100 (Sat, 29 Jan 2011)
New Revision: 207

Modified:
   pkg/man/bootstrap.wa.Rd
   pkg/man/plot.roc.Rd
   pkg/man/predict.wa.Rd
   pkg/man/roc.Rd
   pkg/man/wa.Rd
Log:
reductions in check times thorugh streamlined examples to use Imbrie and Kipp

Modified: pkg/man/bootstrap.wa.Rd
===================================================================
--- pkg/man/bootstrap.wa.Rd	2011-01-28 23:24:42 UTC (rev 206)
+++ pkg/man/bootstrap.wa.Rd	2011-01-28 23:32:36 UTC (rev 207)
@@ -41,14 +41,29 @@
 \seealso{\code{wa}, \code{plot.wa}.}
 \examples{
 ## continue the RLGH and SWAP example from ?wa
-example(wa)
+##example(wa)
 
 ## bootstrap the WA model
-boot.mod <- bootstrap(mod, n.boot = 100)
+##boot.mod <- bootstrap(mod, n.boot = 100)
 
 ## performance statistics
-performance(boot.mod)
+##performance(boot.mod)
 
+## Imbrie and Kipp
+data(ImbrieKipp)
+data(SumSST)
+ik.wa <- wa(SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE,
+            min.tol = 2, small.tol = "min")
+ik.wa
+
+## compare actual tolerances to working values
+with(ik.wa, rbind(tolerances, model.tol))
+
+## bootstrap the WA model
+ik.boot <- bootstrap(ik.wa, n.boot = 100)
+
+## performance statistics
+performance(ik.boot)
 }
 \keyword{multivariate}
 \keyword{methods}

Modified: pkg/man/plot.roc.Rd
===================================================================
--- pkg/man/plot.roc.Rd	2011-01-28 23:24:42 UTC (rev 206)
+++ pkg/man/plot.roc.Rd	2011-01-28 23:32:36 UTC (rev 207)
@@ -156,18 +156,18 @@
   834--846.
 }
 \author{Gavin L. Simpson. Code borrows heavily from \code{\link{plot.lm}}.}
-\seealso{\code{\link{roc}}}
-\examples{
-## continue the example from roc()
-example(roc)
+\seealso{\code{\link{roc}} for a complete example}
+% \examples{
+% ## continue the example from roc()
+% example(roc)
 
-## draw the ROC curve
-plot(swap.roc, 1)
+% ## draw the ROC curve
+% plot(swap.roc, 1)
 
-## draw the four default diagnostic plots
-opar <- par(mfrow = c(2,2))
-plot(swap.roc)
-par(opar)
-}
+% ## draw the four default diagnostic plots
+% opar <- par(mfrow = c(2,2))
+% plot(swap.roc)
+% par(opar)
+% }
 \keyword{hplot}
 \keyword{methods}

Modified: pkg/man/predict.wa.Rd
===================================================================
--- pkg/man/predict.wa.Rd	2011-01-28 23:24:42 UTC (rev 206)
+++ pkg/man/predict.wa.Rd	2011-01-28 23:32:36 UTC (rev 207)
@@ -77,21 +77,6 @@
 performance(v12.pred)
 }
 
-## continue the example from ?wa
-example(wa)
-
-## load the RLGH data
-data(rlgh)
-rlgh <- rlgh / 100
-
-## Predict pH for the RLGH samples
-rlgh.pred <- predict(mod, rlgh, CV = "bootstrap", n.boot = 100)
-
-## draw the fitted reconstruction
-reconPlot(rlgh.pred, use.labels = TRUE, display = "bars")
-
-## extract the model performance stats
-performance(rlgh.pred)
 }
 % Add one or more standard keywords, see file 'KEYWORDS' in the
 % R documentation directory.

Modified: pkg/man/roc.Rd
===================================================================
--- pkg/man/roc.Rd	2011-01-28 23:24:42 UTC (rev 206)
+++ pkg/man/roc.Rd	2011-01-28 23:32:36 UTC (rev 207)
@@ -141,6 +141,13 @@
 swap.roc <- roc(swap.ana, groups = grps)
 swap.roc
 
+## draw the ROC curve
+plot(swap.roc, 1)
+
+## draw the four default diagnostic plots
+layout(matrix(1:4, ncol = 2))
+plot(swap.roc)
+layout(1)
 }
 \keyword{models}% at least one, from doc/KEYWORDS
 \keyword{multivariate}

Modified: pkg/man/wa.Rd
===================================================================
--- pkg/man/wa.Rd	2011-01-28 23:24:42 UTC (rev 206)
+++ pkg/man/wa.Rd	2011-01-28 23:32:36 UTC (rev 207)
@@ -143,12 +143,11 @@
 \author{Gavin L. Simpson and Jari Oksanen}
 \seealso{\code{\link{mat}} for an alternative transfer function method.}
 \examples{
-data(swapdiat)
-data(swappH)
-swapdiat <- swapdiat / 100
+data(ImbrieKipp)
+data(SumSST)
 
 ## fit the WA model
-mod <- wa(swappH ~., data = swapdiat)
+mod <- wa(SumSST ~., data = ImbrieKipp)
 mod
 
 ## extract the fitted values
@@ -166,20 +165,12 @@
 par(mfrow = c(1,1))
 
 ## tolerance DW
-mod2 <- wa(swappH ~., data = swapdiat, tol.dw = TRUE)
+mod2 <- wa(SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE,
+           min.tol = 2, small.tol = "min")
+mod2
 
-## tolerances
-with(mod2, tolerances)
-
-## Imbrie and Kipp
-data(ImbrieKipp)
-data(SumSST)
-ik.wa <- wa(SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE,
-            min.tol = 2, small.tol = "min")
-ik.wa
-
 ## compare actual tolerances to working values
-with(ik.wa, rbind(tolerances, model.tol))
+with(mod2, rbind(tolerances, model.tol))
 }
 \keyword{methods}
 \keyword{models}



More information about the Analogue-commits mailing list