[Robast-commits] r985 - branches/robast-1.1/pkg/RobExtremesBuffer

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 19 13:29:36 CEST 2018


Author: ruckdeschel
Date: 2018-07-19 13:29:35 +0200 (Thu, 19 Jul 2018)
New Revision: 985

Added:
   branches/robast-1.1/pkg/RobExtremesBuffer/CreateInterpolatorsAndMergeThem.R
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGridsOnlyR-2.15.1.rda
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGridsOnlyR-3.5.1rc.rda
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpMerge.rda
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpMergeZip.rda
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpOnlyR-2.15.1.rda
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpOnlyR-3.5.1rc.rda
Removed:
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGrids.rda
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyR-2.15.1.rda
   branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyR-3.5.1rc.rda
Modified:
   branches/robast-1.1/pkg/RobExtremesBuffer/PeterLMScripts.R
Log:
[RobExtremesBuffer] branch 1.1 for reproducibility wrote up CreateInterpolatorsAndMergeThem.R and stored intermediate sysdata.rda files 


Added: branches/robast-1.1/pkg/RobExtremesBuffer/CreateInterpolatorsAndMergeThem.R
===================================================================
--- branches/robast-1.1/pkg/RobExtremesBuffer/CreateInterpolatorsAndMergeThem.R	                        (rev 0)
+++ branches/robast-1.1/pkg/RobExtremesBuffer/CreateInterpolatorsAndMergeThem.R	2018-07-19 11:29:35 UTC (rev 985)
@@ -0,0 +1,104 @@
+#---------------------------------------------------------
+# (1) load package in R>3.0
+#---------------------------------------------------------
+if(getRversion()>"3.0"){
+require(RobAStRDA)
+.basepath <- "C:/rtest/RobASt/branches/robast-1.1/pkg"
+.myFolderFrom <- file.path(.basepath,"RobExtremesBuffer")
+myRDAg30 <- file.path(.basepath,"RobExtremesBuffer/sysdataOnlyGridsOnlyR-3.5.1rc.rda")
+myRDAg3 <- file.path(.basepath,"RobExtremesBuffer/sysdataWithInterpOnlyR-3.5.1rc.rda")
+file.remove(myRDAg3)
+file.remove(myRDAg30)
+CSVFiles <- grep("\\.csv$", dir(.myFolderFrom), value=TRUE)
+CSVFiles <- paste(.myFolderFrom, CSVFiles, sep="/")
+RobAStRDA:::.saveGridToRda(CSVFiles, toFileRDA = myRDAg30, withMerge = FALSE,
+                           withPrint = TRUE, withSmooth = TRUE, df = NULL)
+RobAStRDA:::.computeInterpolators(myRDAg30, myRDAg3,withSmoothFct = TRUE)
+###
+nEg3 <- new.env()
+load(myRDAg3,env=nEg3)
+nEg3L <- ls(all=TRUE,env=nEg3)
+for(nam in nEg3L){
+   loc <- get(nam,env=nEg3)
+   namU <- names(loc)
+   for(nams in namU){
+       print(c(nam,nams,names(loc[[nams]])))
+   }
+}
+}
+#---------------------------------------------------------
+# (2) load package in R<2.15
+#---------------------------------------------------------
+if(getRversion()<"2.16"){
+require(RobAStRDA)
+.basepath <- "C:/rtest/RobASt/branches/robast-1.1/pkg"
+.myFolderFrom <- file.path(.basepath,"RobExtremesBuffer")
+myRDAs30 <- file.path(.basepath,"RobExtremesBuffer/sysdataOnlyGridsOnlyR-2.15.1.rda")
+myRDAs3 <- file.path(.basepath,"RobExtremesBuffer/sysdataWithInterpOnlyR-2.15.1.rda")
+file.remove(myRDAs3)
+file.remove(myRDAs30)
+CSVFiles <- grep("\\.csv$", dir(.myFolderFrom), value=TRUE)
+CSVFiles <- paste(.myFolderFrom, CSVFiles, sep="/")
+RobAStRDA:::.saveGridToRda(CSVFiles, toFileRDA = myRDAs30, withMerge = FALSE,
+                           withPrint = TRUE, withSmooth = TRUE, df = NULL)
+RobAStRDA:::.computeInterpolators(myRDAs30, myRDAs3,withSmoothFct = TRUE)
+###
+nEs3 <- new.env()
+load(myRDAs3,env=nEs3)
+nEs3L <- ls(all=TRUE,env=nEs3)
+for(nam in nEs3L){
+   loc <- get(nam,env=nEs3)
+   namU <- names(loc)
+   for(nams in namU){
+       print(c(nam,nams,names(loc[[nams]])))
+   }
+}
+}
+#---------------------------------------------------------
+# (3) back in R>3.0 merge grids
+#---------------------------------------------------------
+if(getRversion()>"3.0"){
+myRDAs30 <- file.path(.basepath,"RobExtremesBuffer/sysdataOnlyGridsOnlyR-2.15.1.rda")
+myRDAs3 <- file.path(.basepath,"RobExtremesBuffer/sysdataWithInterpOnlyR-2.15.1.rda")
+nEs3 <- new.env()
+mergeE <- new.env()
+load(myRDAs3,env=nEs3)
+(nEs3L <- ls(all=TRUE,env=nEs3))
+names(get(".Gamma", env = nEs3)$MBRE)
+
+for(nam in nEg3L){
+   loc <- get(nam,env=nEg3)
+   namU <- names(loc)
+   for(nams in namU){
+       print(c(nam,nams,names(loc[[nams]])))
+   loc[[nams]]$fun.O <- get(nam,env=nEs3)[[nams]][["fun.O"]]
+   }
+   assign(nam,loc,env=mergeE)
+}
+(mergeEL <- ls(all=TRUE,env=mergeE))
+
+for(nam in mergeEL){
+   loc <- get(nam,env=mergeE)
+   namU <- names(loc)
+   for(nams in namU){
+       print(c(nam,nams,names(loc[[nams]])))
+   }
+}
+}
+#---------------------------------------------------------
+# (4) save merged files and zip them
+#---------------------------------------------------------
+if(getRversion()>"3.0"){
+
+myRDAmerge <- file.path(.basepath,"RobExtremesBuffer/sysdataWithInterpMerge.rda")
+myRDAmergeZip <- file.path(.basepath,"RobExtremesBuffer/sysdataWithInterpMergeZip.rda")
+myRDA <- file.path(.basepath,"RobAStRDA/R/sysdata.rda")
+
+
+mergeEL <- ls(all=TRUE,env=mergeE)
+save(list=mergeEL,envir=mergeE,file=myRDAmerge)
+file.copy(from = myRDAmerge, to = myRDAmergeZip, overwrite = TRUE)
+tools::resaveRdaFiles(myRDAmergeZip)
+file.copy(from = myRDAmergeZip, to = myRDA, overwrite = TRUE)
+}
+

Modified: branches/robast-1.1/pkg/RobExtremesBuffer/PeterLMScripts.R
===================================================================
--- branches/robast-1.1/pkg/RobExtremesBuffer/PeterLMScripts.R	2018-07-18 22:30:03 UTC (rev 984)
+++ branches/robast-1.1/pkg/RobExtremesBuffer/PeterLMScripts.R	2018-07-19 11:29:35 UTC (rev 985)
@@ -31,7 +31,7 @@
 #
 ## evtl naechste Zeile modifizieren
 baseDir0 <- "C:/rtest/RobASt"
-interpolDir <- "branches/robast-1.0/pkg/RobExtremes/inst/AddMaterial/interpolation"
+interpolDir <- "branches/robast-1.1/pkg/RobExtremes/inst/AddMaterial/interpolation"
 interpolFile <- "plotInterpol.R"
 ##
 # (1) Paket laden
@@ -164,7 +164,7 @@
 ## folgenden Code einsourcen:
 ### change adequately:
 .baseDir.loc <- "C:/rtest/RobASt"
-.basepath <- file.path(.baseDir.loc,"branches/robast-0.9/pkg")
+.basepath <- file.path(.baseDir.loc,"branches/robast-1.1/pkg")
 myRDA <- file.path(.basepath,"RobAStRDA/R/sysdata.rda")
 require(RobAStRDA)
 RobAStRDA:::.computeInterpolators(myRDA, myRDA,withSmoothFct = TRUE)

Deleted: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGrids.rda
===================================================================
(Binary files differ)

Added: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGridsOnlyR-2.15.1.rda
===================================================================
(Binary files differ)


Property changes on: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGridsOnlyR-2.15.1.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGridsOnlyR-3.5.1rc.rda
===================================================================
(Binary files differ)


Property changes on: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyGridsOnlyR-3.5.1rc.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Deleted: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyR-2.15.1.rda
===================================================================
(Binary files differ)

Deleted: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataOnlyR-3.5.1rc.rda
===================================================================
(Binary files differ)

Added: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpMerge.rda
===================================================================
(Binary files differ)


Property changes on: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpMerge.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpMergeZip.rda
===================================================================
(Binary files differ)


Property changes on: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpMergeZip.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpOnlyR-2.15.1.rda
===================================================================
(Binary files differ)


Property changes on: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpOnlyR-2.15.1.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpOnlyR-3.5.1rc.rda
===================================================================
(Binary files differ)


Property changes on: branches/robast-1.1/pkg/RobExtremesBuffer/sysdataWithInterpOnlyR-3.5.1rc.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream



More information about the Robast-commits mailing list