[Dplr-commits] r1074 - in pkg/dplR: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 29 17:17:45 CET 2018
Author: andybunn
Date: 2018-01-29 17:17:44 +0100 (Mon, 29 Jan 2018)
New Revision: 1074
Modified:
pkg/dplR/ChangeLog
pkg/dplR/R/latexify.R
pkg/dplR/man/plotRings.Rd
Log:
Fixing bug pointed out by Kurt Hornik in latexify.R that caused failure on R-Devel. Fussing with examples in new plotRings function.
Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog 2017-11-20 22:45:14 UTC (rev 1073)
+++ pkg/dplR/ChangeLog 2018-01-29 16:17:44 UTC (rev 1074)
@@ -1,5 +1,10 @@
* CHANGES IN dplR VERSION 1.6.7
+File: latexify.R
+----------------
+
+- Fixed a bug in latexDate() which was causing failure on R-Devel.
+
File: plotRings.R
----------------
@@ -8,14 +13,15 @@
File: DESCRIPTION
----------------
-- Added in new authors (Darwin Pucha-Cofrep and Jakob Wernicke),
+- Added in new authors (Darwin Pucha-Cofrep and Jakob Wernicke)
- Added animation to Imports list
- Added gmp to Suggests
File: NAMESPACE
----------------
-- Added plotRings to export and importFrom(animation, saveGIF) to support it.
+- Added plotRings to export and importFrom(animation, saveGIF) to support it
+
* CHANGES IN dplR VERSION 1.6.6
File: helpers.R
Modified: pkg/dplR/R/latexify.R
===================================================================
--- pkg/dplR/R/latexify.R 2017-11-20 22:45:14 UTC (rev 1073)
+++ pkg/dplR/R/latexify.R 2018-01-29 16:17:44 UTC (rev 1074)
@@ -6,9 +6,9 @@
latexDate <- function(x = Sys.Date(), ...) {
ltDate <- as.POSIXlt(x, ...)
sprintf("%s %d, %d",
- month.name[ltDate[["mon"]] + 1],
- ltDate[["mday"]],
- 1900 + ltDate[["year"]])
+ month.name[ltDate$mon + 1],
+ ltDate$mday,
+ 1900 + ltDate$year)
}
## Usage: \Sexpr{latexify(string_produced_by_R_code)}
Modified: pkg/dplR/man/plotRings.Rd
===================================================================
--- pkg/dplR/man/plotRings.Rd 2017-11-20 22:45:14 UTC (rev 1073)
+++ pkg/dplR/man/plotRings.Rd 2018-01-29 16:17:44 UTC (rev 1074)
@@ -95,33 +95,28 @@
\author{ Code by Darwin Pucha-Cofrep and Jakob Wernicke. Patched and improved by Andy Bunn and Mikko Korpela. }
\examples{
-
-####### Example 1
# with tree-ring series from Rothenburg data
data("anos1")
yrs <- as.numeric(rownames(anos1))
# Plot rings with data of two radii from same individual tree
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],sp="Cedrela odorata")
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],animation=TRUE, sys.sleep=0.1)
-
-# Playing with colors
+res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], sp="Cedrela odorata") # Playing with colors
res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = "tan", col.outring = "blue")
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = terrain.colors(nrow(anos1)) )
+res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = terrain.colors(nrow(anos1)))
-# x.rings
+# Specifying x.rings
# highlighting only narrow rings
res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'narrow.rings')
-# highlighting and coloring only wider rings
+# Highlighting and coloring only wider rings
res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'wider.rings', col.x.rings = "green")
## Not run
+# Plot Rings and animate:
+res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], animation=TRUE, sys.sleep=0.1)
# Plot Rings and save as GIF:
res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], saveGIF=TRUE, sys.sleep = 0.1)
-
-####### Example 1
# with four fake tree-ring series
trw <- data.frame (trw01.n = abs(rnorm(100, 10, 7.5)), # North direction
trw01.s = abs(rnorm(100, 10, 7.5)), # South direction
More information about the Dplr-commits
mailing list