[Dplr-commits] r753 - pkg/dplR/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 31 14:56:11 CEST 2014


Author: mvkorpel
Date: 2014-03-31 14:56:11 +0200 (Mon, 31 Mar 2014)
New Revision: 753

Modified:
   pkg/dplR/R/read.tridas.R
Log:
Set class of rwl data.frame in a different place.  Also works when
res$measurements is a list of rwl data.frames.


Modified: pkg/dplR/R/read.tridas.R
===================================================================
--- pkg/dplR/R/read.tridas.R	2014-03-31 11:31:36 UTC (rev 752)
+++ pkg/dplR/R/read.tridas.R	2014-03-31 12:56:11 UTC (rev 753)
@@ -1586,6 +1586,7 @@
                                  ## ... fixing the col numbers
                                  remark.data.col[idx.adjust] <<- l
                              }
+                             class(this.df) <- c("rwl", "data.frame")
                              res.df[[length.res]] <<- this.df
                              res.ids[[length.res]] <<- data.frame(i.i.s)
                              res.titles[[length.res]] <<- data.frame(t.i.s)
@@ -2599,7 +2600,5 @@
                        saxVersion = 2,
                        validate = FALSE,
                        useDotNames = TRUE)
-    res <- h$get.results()
-    class(res$measurements) <- c("rwl", "data.frame")
-    res
+    h$get.results()
 }



More information about the Dplr-commits mailing list