[Dplr-commits] r1029 - in pkg/dplR: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 9 01:26:53 CEST 2016


Author: andybunn
Date: 2016-06-09 01:26:52 +0200 (Thu, 09 Jun 2016)
New Revision: 1029

Modified:
   pkg/dplR/R/rwl.report.R
   pkg/dplR/man/rwl.report.Rd
Log:
one last tweak for the day on rwl.report

Modified: pkg/dplR/R/rwl.report.R
===================================================================
--- pkg/dplR/R/rwl.report.R	2016-06-08 23:20:13 UTC (rev 1028)
+++ pkg/dplR/R/rwl.report.R	2016-06-08 23:26:52 UTC (rev 1029)
@@ -28,8 +28,11 @@
   # wee rings
   wee <- rwl > 0 & rwl < 0.003
   wee <- apply(wee,2,which)
-  res$wee <- sapply(wee, function(x) {as.numeric(names(x))} )
-  
+  wee <- sapply(wee, function(x) {as.numeric(names(x))} )
+  wee <- wee[lapply(wee,length)>0]
+  if(length(wee)<1) res$small <- numeric(0)
+  else res$small <- wee
+
   options(warn = oldw)
   
   class(res) <- "rwl.report"
@@ -65,12 +68,12 @@
   }
   cat("-------------\n")
   cat("Very small rings listed by series \n")
-  if(length(x$wee)==0) cat("    None \n")
+  if(length(x$small)==0) cat("    None \n")
   else{
-    for(i in 1:length(x$wee)){
-      tmp = x$wee[[i]]
+    for(i in 1:length(x$small)){
+      tmp = x$small[[i]]
       if(length(tmp)==0) next()
-      cat("Series", names(x$wee)[i],"--",tmp,"\n",  
+      cat("   Series", names(x$small)[i],"--",tmp,"\n",  
           sep = " ")
     }
   }

Modified: pkg/dplR/man/rwl.report.Rd
===================================================================
--- pkg/dplR/man/rwl.report.Rd	2016-06-08 23:20:13 UTC (rev 1028)
+++ pkg/dplR/man/rwl.report.Rd	2016-06-08 23:26:52 UTC (rev 1029)
@@ -29,8 +29,9 @@
 foo <- gp.rwl
 foo[177,1] <- NA 
 foo[177:180,3] <- NA 
-rwl.report(foo)
+foo[185,4] <- 0.001 
 x <- rwl.report(foo)
+class(x)
 x
 }
 \keyword{ manip }



More information about the Dplr-commits mailing list