[Dplr-commits] r1032 - in pkg/dplR: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Aug 9 10:42:23 CEST 2016
Author: mvkorpel
Date: 2016-08-09 10:42:23 +0200 (Tue, 09 Aug 2016)
New Revision: 1032
Added:
pkg/dplR/inst/COPYRIGHTS
Modified:
pkg/dplR/ChangeLog
pkg/dplR/DESCRIPTION
pkg/dplR/R/crn.plot.R
pkg/dplR/man/crn.plot.Rd
Log:
* Better handling of graphical parameters in crn.plot()
* New file inst/COPYRIGHTS
Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog 2016-06-09 19:53:11 UTC (rev 1031)
+++ pkg/dplR/ChangeLog 2016-08-09 08:42:23 UTC (rev 1032)
@@ -1,5 +1,11 @@
* CHANGES IN dplR VERSION 1.6.5
+File: crn.plot.R
+----------------
+
+- Graphical parameters (xlim, ylim, ...) are handled better in crn.plot().
+- Parameter 'ylim2' controls scale of secondary y axis.
+
File: detrend and detrend.series.Rd
-----------------
Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION 2016-06-09 19:53:11 UTC (rev 1031)
+++ pkg/dplR/DESCRIPTION 2016-08-09 08:42:23 UTC (rev 1032)
@@ -3,7 +3,7 @@
Type: Package
Title: Dendrochronology Program Library in R
Version: 1.6.5
-Date: 2016-06-09
+Date: 2016-08-09
Authors at R: c(person("Andy", "Bunn", role = c("aut", "cph",
"cre", "trl"), email = "andy.bunn at wwu.edu"), person("Mikko",
"Korpela", role = c("aut", "trl")), person("Franco", "Biondi",
@@ -15,7 +15,7 @@
"Cecile", role = "ctb"), person("Manfred", "Mudelsee", role =
"ctb"), person("Michael", "Schulz", role = "ctb"))
Author: Andy Bunn [aut, cph, cre, trl], Mikko Korpela [aut, trl], Franco Biondi [aut, cph], Filipe Campelo [aut, cph], Pierre Mérian [aut, cph], Fares Qeadan [aut, cph], Christian Zang [aut, cph], Allan Buras [ctb], Jacob Cecile [ctb], Manfred Mudelsee [ctb], Michael Schulz [ctb]
-Copyright: Authors and Aalto University (for work of M. Korpela)
+Copyright: Authors and file inst/COPYRIGHTS
Maintainer: Andy Bunn <andy.bunn at wwu.edu>
Depends: R (>= 2.15.2)
Imports: graphics, grDevices, grid, stats, utils, lattice (>= 0.13-6),
Modified: pkg/dplR/R/crn.plot.R
===================================================================
--- pkg/dplR/R/crn.plot.R 2016-06-09 19:53:11 UTC (rev 1031)
+++ pkg/dplR/R/crn.plot.R 2016-08-09 08:42:23 UTC (rev 1032)
@@ -22,23 +22,32 @@
nCrn <- ncol(crn)
## Check to see if the crn has sample depth
sd.exist <- crn.names[nCrn] == "samp.depth"
+ args0 <- list(...)
+ args1 <- args0
+ args1[["ylim2"]] <- NULL
+ args1[c("x", "y", "type", "axes", "xlab", "ylab")] <-
+ list(yr.vec, as.name("spl"), "n", FALSE, xlab, ylab)
+ args2 <- args1
+ args2[c("main", "sub", "xlab", "ylab")] <- list("", "", "", "")
if(sd.exist) {
samp.depth <- crn[[nCrn]]
nCrn <- nCrn-1
+ text.samp <- gettext("Sample Depth", domain="R-dplR")
+ sdargs <- args2
+ sdargs[["ylim"]] <- args0[["ylim2"]]
+ sdargs[["y"]] <- samp.depth
}
if(nCrn > 1) layout(matrix(seq_len(nCrn), nrow=nCrn, ncol=1))
# strike these?
# text.years <- gettext("Years", domain="R-dplR")
# text.rwi <- gettext("RWI", domain="R-dplR")
- text.samp <- gettext("Sample Depth", domain="R-dplR")
nyrs2 <- nyrs
for(i in seq_len(nCrn)){
spl <- crn[[i]]
- plot(yr.vec, spl, type="n",axes=FALSE,xlab=xlab,ylab=ylab,...)
+ do.call("plot", args1)
if(sd.exist) {
par(new=TRUE)
- plot(yr.vec, samp.depth, type="n",
- xlab="", ylab="", axes=FALSE)
+ do.call("plot", sdargs)
xx <- c(yr.vec,max(yr.vec,na.rm=TRUE),min(yr.vec,na.rm=TRUE))
yy <- c(samp.depth, 0, 0)
polygon(xx,yy,col=samp.depth.col,border=samp.depth.border.col)
@@ -46,7 +55,7 @@
mtext(text.samp, side=4, line=1.25)
}
par(new=TRUE)
- plot(yr.vec, spl, type="n",axes=FALSE,xlab="",ylab="")
+ do.call("plot", args2)
abline(h=abline.pos,lwd=abline.lwd,
lty=abline.lty,col=abline.col)
lines(yr.vec, spl, col=crn.line.col,lwd=crn.lwd)
Added: pkg/dplR/inst/COPYRIGHTS
===================================================================
--- pkg/dplR/inst/COPYRIGHTS (rev 0)
+++ pkg/dplR/inst/COPYRIGHTS 2016-08-09 08:42:23 UTC (rev 1032)
@@ -0,0 +1,7 @@
+The code of this package is licensed under GPL 2 or later.
+
+For code contributed by Mikko Korpela:
+* Copyright (C) Aalto University (code introduced in dplR <= 1.6.4)
+* Copyright (C) University of Helsinki (code later than dplR 1.6.4)
+
+Other code in the package is copyright (C) by the corresponding authors.
Modified: pkg/dplR/man/crn.plot.Rd
===================================================================
--- pkg/dplR/man/crn.plot.Rd 2016-06-09 19:53:11 UTC (rev 1031)
+++ pkg/dplR/man/crn.plot.Rd 2016-08-09 08:42:23 UTC (rev 1032)
@@ -48,7 +48,9 @@
\item{abline.lwd}{ line width for the reference abline (if added)}
\item{xlab}{ default label for x axis }
\item{ylab}{ default label for y axis }
- \item{\dots}{ Additional arguments to pass to \code{\link{plot}} }
+ \item{\dots}{ Additional arguments to pass to \code{\link{plot}}. The
+ scale of the secondary y axis (sample depth) can be controlled with
+ argument \code{ylim2}. }
}
\details{
This makes a plot of one or more tree-ring chronologies.
More information about the Dplr-commits
mailing list