From noreply at r-forge.r-project.org Sat Aug 24 22:59:01 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 24 Aug 2013 22:59:01 +0200 (CEST) Subject: [Analogue-commits] r353 - pkg/R Message-ID: <20130824205901.9C0951850A2@r-forge.r-project.org> Author: gsimpson Date: 2013-08-24 22:59:01 +0200 (Sat, 24 Aug 2013) New Revision: 353 Modified: pkg/R/weightedCor.R Log: was using ::: when I didn't need to Modified: pkg/R/weightedCor.R =================================================================== --- pkg/R/weightedCor.R 2013-07-27 03:28:52 UTC (rev 352) +++ pkg/R/weightedCor.R 2013-08-24 20:59:01 UTC (rev 353) @@ -66,7 +66,8 @@ if(verbose) setTxtProgressBar(pb, i) Args$y <- unifs[i,] - rmod <- do.call(analogue:::waFit, Args) + ##rmod <- do.call(analogue:::waFit, Args) + rmod <- do.call(waFit, Args) ropt <- rmod$wa.optima pArgs$optima <- ropt rpred <- drop(deshrinkPred(do.call(pFun, pArgs), From noreply at r-forge.r-project.org Sat Aug 24 23:00:05 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 24 Aug 2013 23:00:05 +0200 (CEST) Subject: [Analogue-commits] r354 - pkg/man Message-ID: <20130824210005.A8FB6183EBB@r-forge.r-project.org> Author: gsimpson Date: 2013-08-24 23:00:05 +0200 (Sat, 24 Aug 2013) New Revision: 354 Modified: pkg/man/plot3d.prcurve.Rd Log: tweak Modified: pkg/man/plot3d.prcurve.Rd =================================================================== --- pkg/man/plot3d.prcurve.Rd 2013-08-24 20:59:01 UTC (rev 353) +++ pkg/man/plot3d.prcurve.Rd 2013-08-24 21:00:05 UTC (rev 354) @@ -90,6 +90,7 @@ ## 3D plot of data with curve superimposed plot3d(aber.pc, abernethy2) + } % Add one or more standard keywords, see file 'KEYWORDS' in the % R documentation directory. From noreply at r-forge.r-project.org Sat Aug 24 23:02:08 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 24 Aug 2013 23:02:08 +0200 (CEST) Subject: [Analogue-commits] r355 - pkg Message-ID: <20130824210208.9B9E0183EBB@r-forge.r-project.org> Author: gsimpson Date: 2013-08-24 23:02:08 +0200 (Sat, 24 Aug 2013) New Revision: 355 Modified: pkg/DESCRIPTION pkg/NAMESPACE Log: slim down Depends Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2013-08-24 21:00:05 UTC (rev 354) +++ pkg/DESCRIPTION 2013-08-24 21:02:08 UTC (rev 355) @@ -3,8 +3,8 @@ Title: Analogue and weighted averaging methods for palaeoecology Version: 0.11-4 Date: $Date$ -Depends: R (>= 2.15.0), vegan (>= 1.17-12), princurve, lattice, rgl -Imports: mgcv, MASS, stats, graphics, grid, brglm +Depends: R (>= 2.15.0), vegan (>= 1.17-12), lattice, rgl +Imports: mgcv, MASS, stats, graphics, grid, brglm, princurve Author: Gavin L. Simpson, Jari Oksanen Maintainer: Gavin L. Simpson Description: Fits Modern Analogue Technique and Weighted Averaging transfer Modified: pkg/NAMESPACE =================================================================== --- pkg/NAMESPACE 2013-08-24 21:00:05 UTC (rev 354) +++ pkg/NAMESPACE 2013-08-24 21:02:08 UTC (rev 355) @@ -41,6 +41,9 @@ plot3d, lines3d, decorate3d) +## princurve +importFrom(princurve, + get.lam) ## Exports export(analog, From noreply at r-forge.r-project.org Mon Aug 26 20:06:25 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 26 Aug 2013 20:06:25 +0200 (CEST) Subject: [Analogue-commits] r356 - pkg/R Message-ID: <20130826180625.710E6184289@r-forge.r-project.org> Author: gsimpson Date: 2013-08-26 20:06:24 +0200 (Mon, 26 Aug 2013) New Revision: 356 Modified: pkg/R/deshrink.R pkg/R/internal.R pkg/R/weightedCor.R Log: stop R CMD check complaining about :::, even in comments Modified: pkg/R/deshrink.R =================================================================== --- pkg/R/deshrink.R 2013-08-24 21:02:08 UTC (rev 355) +++ pkg/R/deshrink.R 2013-08-26 18:06:24 UTC (rev 356) @@ -21,7 +21,7 @@ return(list(coefficients = coef, env = pred)) } ## deshrink to equal SD - ## A bit like in vegan:::wascores, but wascores uses + ## A bit like in vegan's wascores, but wascores uses ## weighted sd which would need row and column sums in the ## function call, and this would make the function API ## incompatible with other *.deshrink functions. Modified: pkg/R/internal.R =================================================================== --- pkg/R/internal.R 2013-08-24 21:02:08 UTC (rev 355) +++ pkg/R/internal.R 2013-08-26 18:06:24 UTC (rev 356) @@ -172,41 +172,6 @@ opt } -## inverse deshrinking function -## `inv.deshrink` <- function(env, wa.env) { -## X <- cbind(rep(1, length(wa.env)), wa.env) -## QR <- qr(X) -## coef <- qr.coef(QR, env) -## pred <- qr.fitted(QR, env) -## return(list(coefficients = coef, env = pred)) -## } - -## classical deshrinking -## `class.deshrink` <- function(env, wa.env) { -## X <- cbind(rep(1, length(env)), env) -## QR <- qr(X) -## coef <- drop(qr.coef(QR, wa.env)) -## coef <- c(-coef[1], 1)/coef[2] -## pred <- deshrink.pred(wa.env, coef) -## return(list(coefficients = coef, env = pred)) -## } - -## deshrinking to equal sd -## A bit like in vegan:::wascores, but wascores uses weighted sd which -## would need row and column sums in the function call, and this would -## make the function API incompatible with other *.deshrink functions. -## `expand.deshrink` <- function(env, wa.env) { -## b1 <- sd(env)/sd(wa.env) -## b0 <- mean(env) - b1 * mean(wa.env) -## pred <- b0 + b1 * wa.env -## return(list(coefficients = c(b0, b1), env = pred)) -## } - -# Do not deshrink: for those who think they know what they do -## `no.deshrink` <- function(env, wa.env) { -## return(list(coefficients = c(0, 1), env = wa.env)) -## } - ## fast rowSums and colSums functiosn without the checking `RowSums` <- function(x, na.rm = FALSE) { dn <- dim(x) Modified: pkg/R/weightedCor.R =================================================================== --- pkg/R/weightedCor.R 2013-08-24 21:02:08 UTC (rev 355) +++ pkg/R/weightedCor.R 2013-08-26 18:06:24 UTC (rev 356) @@ -18,7 +18,7 @@ x <- x[, nams] fossil <- fossil[, nams] ## WA model and optima - Args <- head(formals(analogue:::wa.default), -1) + Args <- head(formals(wa.default), -1) dots <- list(x = x, y = env, env = NULL, ...) Args <- modifyList(Args, dots) Args <- lapply(Args, @@ -66,7 +66,6 @@ if(verbose) setTxtProgressBar(pb, i) Args$y <- unifs[i,] - ##rmod <- do.call(analogue:::waFit, Args) rmod <- do.call(waFit, Args) ropt <- rmod$wa.optima pArgs$optima <- ropt From noreply at r-forge.r-project.org Mon Aug 26 21:28:28 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 26 Aug 2013 21:28:28 +0200 (CEST) Subject: [Analogue-commits] r357 - pkg Message-ID: <20130826192828.E4852184695@r-forge.r-project.org> Author: gsimpson Date: 2013-08-26 21:28:28 +0200 (Mon, 26 Aug 2013) New Revision: 357 Modified: pkg/DESCRIPTION Log: add Authors at R field Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2013-08-26 18:06:24 UTC (rev 356) +++ pkg/DESCRIPTION 2013-08-26 19:28:28 UTC (rev 357) @@ -6,6 +6,11 @@ Depends: R (>= 2.15.0), vegan (>= 1.17-12), lattice, rgl Imports: mgcv, MASS, stats, graphics, grid, brglm, princurve Author: Gavin L. Simpson, Jari Oksanen +Authors at R: c(person(given = c("Gavin", "L."), family = "Simpson", + role = c("aut", "cre"), + email = "gavin.simpson at uregina.ca"), + person(given = "Jari", family = "Oksanen", + role = "aut")) Maintainer: Gavin L. Simpson Description: Fits Modern Analogue Technique and Weighted Averaging transfer function models for prediction of environmental data from species From noreply at r-forge.r-project.org Mon Aug 26 22:53:19 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 26 Aug 2013 22:53:19 +0200 (CEST) Subject: [Analogue-commits] r358 - pkg/man Message-ID: <20130826205319.E279F185513@r-forge.r-project.org> Author: gsimpson Date: 2013-08-26 22:53:18 +0200 (Mon, 26 Aug 2013) New Revision: 358 Modified: pkg/man/distance3.Rd Log: add alias for distanceX() Modified: pkg/man/distance3.Rd =================================================================== --- pkg/man/distance3.Rd 2013-08-26 19:28:28 UTC (rev 357) +++ pkg/man/distance3.Rd 2013-08-26 20:53:18 UTC (rev 358) @@ -1,5 +1,6 @@ \name{distance3} \alias{distance3} +\alias{distanceX} \alias{distance3.default} \concept{dissimilarity} \concept{dissimilarity coefficient} @@ -188,6 +189,8 @@ ## Using distance on an object of class join #dists <- distance3(join(train, fossil)) #str(dists) +dists <- distance(join(train, fossil)) +##distsX <- distanceX(join(train, fossil)) ## calculate Gower's general coefficient for mixed data ## first, make a couple of variables factors From noreply at r-forge.r-project.org Mon Aug 26 23:59:58 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 26 Aug 2013 23:59:58 +0200 (CEST) Subject: [Analogue-commits] r359 - pkg Message-ID: <20130826215958.94C8C185C62@r-forge.r-project.org> Author: gsimpson Date: 2013-08-26 23:59:58 +0200 (Mon, 26 Aug 2013) New Revision: 359 Modified: pkg/DESCRIPTION Log: adds BugReports and NeedsCompilation Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2013-08-26 20:53:18 UTC (rev 358) +++ pkg/DESCRIPTION 2013-08-26 21:59:58 UTC (rev 359) @@ -12,6 +12,8 @@ person(given = "Jari", family = "Oksanen", role = "aut")) Maintainer: Gavin L. Simpson +BugReports: http://r-forge.r-project.org/tracker/?func=browse&group_id=69&atid=338 +NeedsCompilation: yes Description: Fits Modern Analogue Technique and Weighted Averaging transfer function models for prediction of environmental data from species data, and related methods used in palaeoecology.