[Analogue-commits] r290 - in pkg: . inst man tests/Examples
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 2 15:10:44 CET 2013
Author: gsimpson
Date: 2013-01-02 15:10:44 +0100 (Wed, 02 Jan 2013)
New Revision: 290
Modified:
pkg/DESCRIPTION
pkg/NAMESPACE
pkg/inst/ChangeLog
pkg/man/mat.Rd
pkg/tests/Examples/analogue-Ex.Rout.save
Log:
set up 0.10-0 release for CRAN
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2012-12-23 19:12:15 UTC (rev 289)
+++ pkg/DESCRIPTION 2013-01-02 14:10:44 UTC (rev 290)
@@ -1,7 +1,7 @@
Package: analogue
Type: Package
Title: Analogue and weighted averaging methods for palaeoecology
-Version: 0.9-11
+Version: 0.10-0
Date: $Date$
Depends: R (>= 2.15.0), stats, graphics, vegan (>= 1.17-12), lattice, grid,
MASS, princurve, mgcv
Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE 2012-12-23 19:12:15 UTC (rev 289)
+++ pkg/NAMESPACE 2013-01-02 14:10:44 UTC (rev 290)
@@ -29,6 +29,7 @@
dissim,
dissimilarities,
distance,
+ distance3,
fuse,
getK,
gradientDist,
@@ -79,6 +80,7 @@
S3method(dissimilarities, mat)
S3method(distance, default)
S3method(distance, join)
+S3method(distance3, default)
S3method(eigenvals, pcr)
S3method(fuse, dist)
S3method(fuse, matrix)
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2012-12-23 19:12:15 UTC (rev 289)
+++ pkg/inst/ChangeLog 2013-01-02 14:10:44 UTC (rev 290)
@@ -1,5 +1,10 @@
analogue Change Log
+Version 0.10-0
+
+ * Release: Version 0.9-11 plus a minor documentation fix
+ was released to CRAN 2 Jan 2013.
+
Version 0.9-11
* Was loading compiled code both via the package namespace
Modified: pkg/man/mat.Rd
===================================================================
--- pkg/man/mat.Rd 2012-12-23 19:12:15 UTC (rev 289)
+++ pkg/man/mat.Rd 2013-01-02 14:10:44 UTC (rev 290)
@@ -279,7 +279,7 @@
plot(ik.mat2)
par(mfrow = c(1,1))
-## reconstruct for the RLGH core data
+## reconstruct for the V12.122 core data
coreV12.mat2 <- predict(ik.mat, V12.122, k = 3)
coreV12.mat2
summary(coreV12.mat2)
Modified: pkg/tests/Examples/analogue-Ex.Rout.save
===================================================================
--- pkg/tests/Examples/analogue-Ex.Rout.save 2012-12-23 19:12:15 UTC (rev 289)
+++ pkg/tests/Examples/analogue-Ex.Rout.save 2013-01-02 14:10:44 UTC (rev 290)
@@ -1,5 +1,5 @@
-R version 2.15.1 Patched (2012-07-27 r60002) -- "Roasted Marshmallows"
+R version 2.15.2 Patched (2012-12-05 r61228) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
@@ -24,14 +24,14 @@
> library('analogue')
Loading required package: vegan
Loading required package: permute
-This is vegan 2.0-4
+This is vegan 2.0-5
Loading required package: lattice
Loading required package: grid
Loading required package: MASS
Loading required package: princurve
Loading required package: mgcv
-This is mgcv 1.7-6. For overview type 'help("mgcv-package")'.
-This is analogue 0.9-10
+This is mgcv 1.7-22. For overview type 'help("mgcv-package")'.
+This is analogue 0.10-0
>
> assign(".oldSearch", search(), pos = 'CheckExEnv')
> cleanEx()
@@ -2330,6 +2330,79 @@
>
>
> cleanEx()
+> nameEx("distance3")
+> ### * distance3
+>
+> flush(stderr()); flush(stdout())
+>
+> ### Name: distance3
+> ### Title: Flexibly calculate dissimilarity or distance measures
+> ### Aliases: distance3 distance3.default
+> ### Keywords: multivariate methods
+>
+> ### ** Examples
+>
+> ## simple example using dummy data
+> train <- data.frame(matrix(abs(runif(200)), ncol = 10))
+> rownames(train) <- LETTERS[1:20]
+> colnames(train) <- as.character(1:10)
+> fossil <- data.frame(matrix(abs(runif(100)), ncol = 10))
+> colnames(fossil) <- as.character(1:10)
+> rownames(fossil) <- letters[1:10]
+>
+> ## calculate distances/dissimilarities between train and fossil
+> ## samples
+> test <- distance3(train, fossil)
+> test.o <- distance(train, fossil)
+> stopifnot(isTRUE(all.equal(test.o, test)))
+>
+> ## using a different coefficient, chi-square distance
+> test <- distance3(train, fossil, method = "chi.distance")
+> test.o <- distance(train, fossil, method = "chi.distance")
+> stopifnot(isTRUE(all.equal(test.o, test)))
+>
+> ## calculate pairwise distances/dissimilarities for training
+> ## set samples
+> ##test2 <- distance3(train)
+>
+> ## Using distance on an object of class join
+> #dists <- distance3(join(train, fossil))
+> #str(dists)
+>
+> ## calculate Gower's general coefficient for mixed data
+> ## first, make a couple of variables factors
+> fossil[,4] <- factor(sample(rep(1:4, length = 10), 10))
+> train[,4] <- factor(sample(rep(1:4, length = 20), 20))
+> ## now fit the mixed coefficient
+> test3 <- distance3(train, fossil, "mixed")
+>
+> ## Example from page 260 of Legendre & Legendre (1998)
+> x1 <- t(c(2,2,NA,2,2,4,2,6))
+> x2 <- t(c(1,3,3,1,2,2,2,5))
+> Rj <- c(1,4,2,4,1,3,2,5) # supplied ranges
+>
+> distance3(x1, x2, method = "mixed", R = Rj)
+ [,1]
+[1,] 0.3380952
+attr(,"method")
+[1] "mixed"
+attr(,"class")
+[1] "distance" "matrix"
+> distance(x1, x2, method = "mixed", R = Rj)
+[1] 0.3380952
+attr(,"method")
+[1] "mixed"
+attr(,"class")
+[1] "distance" "matrix"
+>
+> ## note this gives 1 - 0.66 (not 0.66 as the answer in
+> ## Legendre & Legendre) as this is expressed as a
+> ## distance whereas Legendre & Legendre describe the
+> ## coefficient as similarity coefficient
+>
+>
+>
+> cleanEx()
> nameEx("fuse")
> ### * fuse
>
@@ -4075,7 +4148,7 @@
> plot(ik.mat2)
> par(mfrow = c(1,1))
>
-> ## reconstruct for the RLGH core data
+> ## reconstruct for the V12.122 core data
> coreV12.mat2 <- predict(ik.mat, V12.122, k = 3)
> coreV12.mat2
@@ -4950,25 +5023,25 @@
wa> ## residuals for the training set
wa> residuals(mod4)
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22
--3.89845110 -0.95914237 -0.57577610 0.83646773 -1.12654866 1.85855684
+-3.89845110 -0.95914236 -0.57577610 0.83646773 -1.12654865 1.85855684
V2.12 V23.29 V12.43 R9.7 A157.3 V23.81
- 4.93907447 -1.56332718 1.02901346 -2.01091600 0.72379238 -2.30397581
+ 4.93907447 -1.56332718 1.02901346 -2.01091601 0.72379237 -2.30397582
V23.82 V12.53 V23.83 V12.56 A152.84 V16.50
--1.16893885 -1.90464620 0.99721686 -1.39764003 1.29346295 -0.29234573
+-1.16893886 -1.90464621 0.99721685 -1.39764003 1.29346294 -0.29234573
V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
- 2.13000056 -4.44031822 -0.92783840 0.99172654 -1.49152689 1.88724026
+ 2.13000055 -4.44031821 -0.92783839 0.99172654 -1.49152688 1.88724027
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189
- 2.78850048 -0.63727536 0.33475037 -0.01275751 -1.65993109 -2.09930701
+ 2.78850049 -0.63727536 0.33475038 -0.01275751 -1.65993108 -2.09930701
V12.18 V7.67 V17.165 V19.310 V16.190 A153.154
--0.97538682 2.31383514 1.87380535 2.64327583 0.01900071 0.13747169
+-0.97538682 2.31383515 1.87380536 2.64327583 0.01900072 0.13747169
V19.308 V22.172 V10.98 V22.219 V16.33 V22.204
--0.26612390 -2.21647192 2.40270758 0.25826513 -1.69856608 0.20738893
+-0.26612390 -2.21647192 2.40270759 0.25826513 -1.69856608 0.20738893
V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
-0.92731700 -0.84954530 -0.55321548 0.80956624 0.66973330 0.70524398
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128
-0.23696237 -0.14589252 -0.26826158 0.54819699 -0.32786314 1.64879299
A179.13 V9.31 V20.230 V20.7 V20.234 V18.21
- 1.53212230 0.96958483 0.44047759 -0.17038549 -0.21308146 -0.39014885
+ 1.53212229 0.96958483 0.44047759 -0.17038549 -0.21308146 -0.39014886
V12.122
0.72061292
>
@@ -7124,25 +7197,25 @@
> ## residuals for the training set
> residuals(mod4)
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22
--3.89845110 -0.95914237 -0.57577610 0.83646773 -1.12654866 1.85855684
+-3.89845110 -0.95914236 -0.57577610 0.83646773 -1.12654865 1.85855684
V2.12 V23.29 V12.43 R9.7 A157.3 V23.81
- 4.93907447 -1.56332718 1.02901346 -2.01091600 0.72379238 -2.30397581
+ 4.93907447 -1.56332718 1.02901346 -2.01091601 0.72379237 -2.30397582
V23.82 V12.53 V23.83 V12.56 A152.84 V16.50
--1.16893885 -1.90464620 0.99721686 -1.39764003 1.29346295 -0.29234573
+-1.16893886 -1.90464621 0.99721685 -1.39764003 1.29346294 -0.29234573
V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
- 2.13000056 -4.44031822 -0.92783840 0.99172654 -1.49152689 1.88724026
+ 2.13000055 -4.44031821 -0.92783839 0.99172654 -1.49152688 1.88724027
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189
- 2.78850048 -0.63727536 0.33475037 -0.01275751 -1.65993109 -2.09930701
+ 2.78850049 -0.63727536 0.33475038 -0.01275751 -1.65993108 -2.09930701
V12.18 V7.67 V17.165 V19.310 V16.190 A153.154
--0.97538682 2.31383514 1.87380535 2.64327583 0.01900071 0.13747169
+-0.97538682 2.31383515 1.87380536 2.64327583 0.01900072 0.13747169
V19.308 V22.172 V10.98 V22.219 V16.33 V22.204
--0.26612390 -2.21647192 2.40270758 0.25826513 -1.69856608 0.20738893
+-0.26612390 -2.21647192 2.40270759 0.25826513 -1.69856608 0.20738893
V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
-0.92731700 -0.84954530 -0.55321548 0.80956624 0.66973330 0.70524398
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128
-0.23696237 -0.14589252 -0.26826158 0.54819699 -0.32786314 1.64879299
A179.13 V9.31 V20.230 V20.7 V20.234 V18.21
- 1.53212230 0.96958483 0.44047759 -0.17038549 -0.21308146 -0.39014885
+ 1.53212229 0.96958483 0.44047759 -0.17038549 -0.21308146 -0.39014886
V12.122
0.72061292
>
@@ -7292,7 +7365,7 @@
> ### * <FOOTER>
> ###
> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed: 15.918 0.228 16.336 0 0
+Time elapsed: 22.741 0.267 23.803 0 0
> grDevices::dev.off()
null device
1
More information about the Analogue-commits
mailing list