[Soiltexture-commits] r59 - / pkg pkg/soiltexture pkg/soiltexture/R pkg/soiltexture/inst pkg/soiltexture/inst/doc pkg/soiltexture/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 9 14:23:29 CET 2011


Author: jmoeys
Date: 2011-11-09 14:23:29 +0100 (Wed, 09 Nov 2011)
New Revision: 59

Added:
   pkg/soiltexture/inst/polish_language_ANSI.r
   pkg/soiltexture/inst/polish_triangle_ANSI.r
Removed:
   pkg/soiltexture/inst/doc/julienmoeysmailaddress-322-24.png
Modified:
   SoilTexture_changelog.txt
   pkg/
   pkg/soiltexture/DESCRIPTION
   pkg/soiltexture/R/onAttach.R
   pkg/soiltexture/R/soiltexture.R
   pkg/soiltexture/inst/doc/soiltexture_vignette.Rnw
   pkg/soiltexture/man/soiltexture-package.Rd
   soiltexture_compile.R
Log:
New attempt to load the Polish triangle under Mac/Darwin and freeBSD

Modified: SoilTexture_changelog.txt
===================================================================
--- SoilTexture_changelog.txt	2011-11-06 09:23:58 UTC (rev 58)
+++ SoilTexture_changelog.txt	2011-11-09 13:23:29 UTC (rev 59)
@@ -3,6 +3,9 @@
 Julien MOEYS
 -----------------------------------------------------------------------------------------
 
+20111109    New attempt to fix problems while loading the Polish texture triangle 
+            under Mac/Darwin and freeBSD.
+
 20111101    Fixed a potential infinite loop problem in the texture transformation 
             functions based on "drc"
 


Property changes on: pkg
___________________________________________________________________
Modified: svn:ignore
   - soiltexture.Rcheck
soiltexture.Rcheck.zip
soiltexture_1.2.3.tar.gz
soiltexture_1.2.3_R_i486-pc-linux-gnu.tar.gz
soiltexture_1.2.4.tar.gz
soiltexture_1.2.4.zip

   + soiltexture.Rcheck
soiltexture.Rcheck.zip
soiltexture_1.2.3.tar.gz
soiltexture_1.2.3_R_i486-pc-linux-gnu.tar.gz
soiltexture_1.2.4.tar.gz
soiltexture_1.2.4.zip
soiltexture_1.2.5.tar.gz
soiltexture_1.2.5.zip


Modified: pkg/soiltexture/DESCRIPTION
===================================================================
--- pkg/soiltexture/DESCRIPTION	2011-11-06 09:23:58 UTC (rev 58)
+++ pkg/soiltexture/DESCRIPTION	2011-11-09 13:23:29 UTC (rev 59)
@@ -1,6 +1,6 @@
 Package: soiltexture
-Version: 1.2.4
-Date: 2011-11-01
+Version: 1.2.5
+Date: 2011-11-09
 Title: Functions for soil texture plot, classification and transformation
 Author: Julien MOEYS <jules_m78-soiltexture at yahoo.fr>, contributions from Wei Shangguan.
 Maintainer: Julien MOEYS <jules_m78-soiltexture at yahoo.fr> 

Modified: pkg/soiltexture/R/onAttach.R
===================================================================
--- pkg/soiltexture/R/onAttach.R	2011-11-06 09:23:58 UTC (rev 58)
+++ pkg/soiltexture/R/onAttach.R	2011-11-09 13:23:29 UTC (rev 59)
@@ -5,26 +5,26 @@
     cat( "'", pkgname, "' loaded.\n" ) 
     #
     # Setup the polish triangle and language setting
-    if( !(tolower(Sys.info()["sysname"]) %in% c("mac","darwin")) )
+    ## if( !(tolower(Sys.info()["sysname"]) %in% c("mac","darwin")) ) 
+    if( tolower(Sys.info()["sysname"]) %in% c("linux","windows") ) 
     {   #
         source( system.file( "polish_triangle.r", package = pkgname ), encoding = "UTF-8" ) 
         source( system.file( "polish_language.r", package = pkgname ), encoding = "UTF-8" ) 
-        #
-        lang.par <- TT.get( "lang.par" ) 
-        lang.par <- rbind( 
-            lang.par, 
-            lang.par2 
-        )   #
-        #
-        # rm( lang.par2 ) 
-        #
-        TT.set( "lang.par" = lang.par ) 
     }else{ 
-        cat( "\tPolish diagram and language are not default loaded for Macs,\n" ) 
-        cat( "\ttype source( system.file( 'polish_triangle.r', package = pkgname ), encoding = 'UTF-8' )\n" ) 
-        cat( "\tand source( system.file( 'polish_language.r', package = pkgname ), encoding = 'UTF-8' )\n" ) 
-        cat( "\tto load them (if it works)" ) 
+        source( system.file( "polish_triangle_ANSI.r", package = pkgname ) ) 
+        source( system.file( "polish_language_ANSI.r", package = pkgname ) ) 
     }   #
     #
+    lang.par <- TT.get( "lang.par" ) 
+    lang.par <- rbind( 
+        lang.par, 
+        lang.par2 
+    )   #
+    #
+    TT.set( "lang.par" = lang.par ) 
+    #
+    packageStartupMessage( 
+        paste("'", pkgname, "' loaded.", sep = "" ) 
+    )   #
 }   #
 

Modified: pkg/soiltexture/R/soiltexture.R
===================================================================
--- pkg/soiltexture/R/soiltexture.R	2011-11-06 09:23:58 UTC (rev 58)
+++ pkg/soiltexture/R/soiltexture.R	2011-11-09 13:23:29 UTC (rev 59)
@@ -1677,10 +1677,10 @@
     if( gray.l ){ m.cl[] <- rep(mean(m.cl),3) }     # 1:3 stands here in case of alpha value...
     #
     rgb( 
-        r               = m.cl["red"], 
-        g               = m.cl["green"], 
-        b               = m.cl["blue"], 
-        maxColorValue   = 255  
+        red           = m.cl["red"], 
+        green         = m.cl["green"], 
+        blue          = m.cl["blue"], 
+        maxColorValue = 255  
     )   #
 }   #
 
@@ -1902,7 +1902,7 @@
     null.geo.par    <- unlist(  lapply( 
             X   = geo.par, 
             FUN = function(X){ 
-                is.null( get(x=X,env=p.env) ) 
+                is.null( get(x=X,envir=p.env) ) 
             }   #
     )   )   #
     #
@@ -1922,14 +1922,14 @@
             silent  <- lapply( 
                 X   = geo.par, 
                 FUN = function(X){ 
-                    assign(x=X,value=TT.data[[X]],env=p.env)
+                    assign(x=X,value=TT.data[[X]],envir=p.env)
                 }   #
             )   #
         }else{ 
             silent  <- lapply( 
                 X   = geo.par, 
                 FUN = function(X){ 
-                    assign(x=X,value=TT.get(X),env=p.env) 
+                    assign(x=X,value=TT.get(X),envir=p.env) 
                 }   #
             )   #
         }   #
@@ -3469,9 +3469,9 @@
                 bg.hsv      <- col2rgb( bg, alpha = FALSE )[,1]/255 
                 #
                 grid.col    <- rgb( 
-                    r   = bg.hsv["red"], 
-                    g   = bg.hsv["green"], 
-                    b   = bg.hsv["blue"]  
+                    red   = bg.hsv["red"], 
+                    green = bg.hsv["green"], 
+                    blue  = bg.hsv["blue"]  
                 )   #
             # Frame backgound color is not NULL 
             }else{ 
@@ -4268,7 +4268,7 @@
         col         = col, 
         cex         = cex, 
         font        = font, 
-        family      = family.op, 
+        family.op   = family.op, 
         adj         = adj, 
         pos         = pos, 
         offset      = offset, 

Deleted: pkg/soiltexture/inst/doc/julienmoeysmailaddress-322-24.png
===================================================================
(Binary files differ)

Modified: pkg/soiltexture/inst/doc/soiltexture_vignette.Rnw
===================================================================
--- pkg/soiltexture/inst/doc/soiltexture_vignette.Rnw	2011-11-06 09:23:58 UTC (rev 58)
+++ pkg/soiltexture/inst/doc/soiltexture_vignette.Rnw	2011-11-09 13:23:29 UTC (rev 59)
@@ -557,6 +557,10 @@
 
 The soil texture class symbols are:
 
+<<echo=FALSE>>= 
+library( "xtable" ) 
+@ 
+
 <<echo=FALSE,results=tex>>= 
 tex.tbl <- TT.classes.tbl( class.sys = "FAO50.TT" ) 
 xtable( 

Added: pkg/soiltexture/inst/polish_language_ANSI.r
===================================================================
--- pkg/soiltexture/inst/polish_language_ANSI.r	                        (rev 0)
+++ pkg/soiltexture/inst/polish_language_ANSI.r	2011-11-09 13:23:29 UTC (rev 59)
@@ -0,0 +1,9 @@
+lang.par2 <- data.frame( 
+    "lang"  = "pl", 
+    "CLAY"  = "\"Il\"", 
+    "SILT"  = "\"Pyl\"", 
+    "SAND"  = "\"Piasek\"", 
+    "TT"    = "\"Trójkat Fereta\"", 
+    stringsAsFactors    = FALSE  
+)   #
+

Added: pkg/soiltexture/inst/polish_triangle_ANSI.r
===================================================================
--- pkg/soiltexture/inst/polish_triangle_ANSI.r	                        (rev 0)
+++ pkg/soiltexture/inst/polish_triangle_ANSI.r	2011-11-09 13:23:29 UTC (rev 59)
@@ -0,0 +1,68 @@
+TT.add( 
+    "PL.TT" = list(  #  Polish Triangle parameters according to Systematyka
+                     #    gleb Polski (1989) for non-alluvial soils
+        #
+        main    = "PL", 
+        # 
+        #        The list below specify the CSS coordinates of the different POINTS
+        #           that are used to draw soil texture classes. One points can be 
+        #           used by several classes :
+        #          = P01    P02    P03    P04    P05    P06    P07    P08    P09    P10    P11    P12
+        #          = P13    P14    P15    P16    P17    P18    P19    P20    P21    P22    P23   
+        #          = P24    P25    P26    P27    P28    P29    P30    P31    P32    P33 (submits)
+        "tt.points"     = data.frame( 
+            "CLAY"      = c( 1.000, 0.900, 0.750, 0.600, 0.650, 0.500, 0.500, 0.500, 0.500, 0.500, 0.350, 0.350,  
+                     0.350, 0.350, 0.250, 0.250, 0.250, 0.200, 0.200, 0.200, 0.150, 0.150, 0.150,         
+                     0.100, 0.100, 0.100, 0.050, 0.050, 0.050, 0.000, 0.000, 0.000, 0.000  ),  
+                #
+            "SILT"      = c( 0.000, 0.000, 0.250, 0.400, 0.250, 0.000, 0.250, 0.300, 0.400, 0.500, 0.000, 0.250,  
+                     0.400, 0.650, 0.000, 0.250, 0.400, 0.000, 0.250, 0.400, 0.000, 0.250, 0.400,         
+                     0.000, 0.250, 0.400, 0.000, 0.250, 0.400, 0.000, 0.250, 0.400, 1.000  ),  
+                #
+            "SAND"      = c( 0.000, 0.100, 0.000, 0.000, 0.100, 0.500, 0.250, 0.200, 0.100, 0.000, 0.650, 0.400,  
+                     0.250, 0.000, 0.750, 0.500, 0.350, 0.800, 0.550, 0.400, 0.850, 0.600, 0.450,         
+                     0.900, 0.650, 0.500, 0.950, 0.700, 0.550, 1.000, 0.750, 0.600, 0.000  )  
+        ),  #
+        #
+        #   Abreviations;       Names of the texture cl;    Points marking the class limits (points specified above)
+        "tt.polygons"   = list( 
+            "i"         = list( "name" = "il wlasciwy",            "points" = c(01,03,05,02)       ), 
+            "ip"        = list( "name" = "il pylasty",             "points" = c(03,10,09,05)       ), 
+            "gc"        = list( "name" = "glina ciezka",           "points" = c(02,05,07,06)       ), 
+            "gcp"       = list( "name" = "glina ciezka pylasta",           "points" = c(05,09,07)          ), 
+            "gs"        = list( "name" = "glina srednia",          "points" = c(06,07,12,11)       ), 
+            "gsp"       = list( "name" = "glina srednia pylasta",          "points" = c(07,09,13,12)       ), 
+            "gl"        = list( "name" = "glina lekka silnie spiaszczona",         "points" = c(11,12,16,15)       ), 
+            "glp"       = list( "name" = "glina lekka silnie spiaszczona pylasta", "points" = c(12,13,17,16)       ), 
+            "gp"        = list( "name" = "glina lekka slabo spiaszczona",          "points" = c(15,16,19,18)       ), 
+            "gpp"       = list( "name" = "glina lekka slabo spiaszczona pylasta",  "points" = c(16,17,20,19)       ), 
+            "pgm"       = list( "name" = "piasek gliniasty mocny",         "points" = c(18,19,22,21)       ), 
+            "pgpm"      = list( "name" = "piasek gliniasty mocny pylasty",         "points" = c(19,20,23,22)       ), 
+            "pgl"       = list( "name" = "piasek gliniasty lekki",         "points" = c(21,22,25,24)       ), 
+            "pglp"      = list( "name" = "piasek gliniasty lekki pylasty",         "points" = c(22,23,26,25)       ), 
+            "ps"        = list( "name" = "piasek slabogliniasty",          "points" = c(24,25,28,27)       ), 
+            "psp"       = list( "name" = "piasek slabogliniasty pylasty",          "points" = c(25,26,29,28)       ), 
+            "pl"        = list( "name" = "piasek lekki",           "points" = c(27,28,31,30)       ), 
+            "plp"       = list( "name" = "piasek lekki pylasty",           "points" = c(28,29,32,31)       ), 
+            "pli"       = list( "name" = "pyl ilasty",             "points" = c(09,10,14,13)       ), 
+            "plz"       = list( "name" = "pyl zwykly",             "points" = c(13,14,33,32)       )  
+        ),  #
+        #
+        # Triangle specific parameters for triangle geometry / appearance
+        #   See general parameters above for detailed description of them
+        blr.clock       = rep(T,3), 
+        tlr.an          = c(60,60,60), 
+        #
+        blr.tx      = c("SAND","CLAY","SILT"), 
+        # 
+        base.css.ps.lim = c(0,20,100,1000), 
+        tri.css.ps.lim  = c(0,20,100,1000), 
+        #
+        unit.ps         = quote(bold(mu) * bold('m')), 
+        unit.tx         = quote(bold('%')), 
+        #
+        text.sum        = 100 
+    )   #
+)   #
+
+

Modified: pkg/soiltexture/man/soiltexture-package.Rd
===================================================================
--- pkg/soiltexture/man/soiltexture-package.Rd	2011-11-06 09:23:58 UTC (rev 58)
+++ pkg/soiltexture/man/soiltexture-package.Rd	2011-11-09 13:23:29 UTC (rev 59)
@@ -16,8 +16,8 @@
 from the package 'plotrix' by Jim Lemon et al.}
 \details{
 \tabular{ll}{Package: \tab soiltexture\cr
-Version: \tab 1.2.4\cr
-Date: \tab 2011-11-01\cr
+Version: \tab 1.2.5\cr
+Date: \tab 2011-11-09\cr
 Title: \tab Functions for soil texture plot, classification and transformation\cr
 Author: \tab Julien MOEYS <jules_m78-soiltexture at yahoo.fr>, contributions from Wei Shangguan.\cr
 Maintainer: \tab Julien MOEYS <jules_m78-soiltexture at yahoo.fr>\cr

Modified: soiltexture_compile.R
===================================================================
--- soiltexture_compile.R	2011-11-06 09:23:58 UTC (rev 58)
+++ soiltexture_compile.R	2011-11-09 13:23:29 UTC (rev 59)
@@ -2,7 +2,7 @@
 pkg.dir      <- "C:/_R_PACKAGES/soiltexture/pkg" 
 # pkg.dir      <- "/home/jules/_WORK/R_PACKAGES/soiltexture/pkg" 
 pkg.name     <- "soiltexture" 
-pkg.version  <- "1.2.4" 
+pkg.version  <- "1.2.5" 
 pkg.depends  <- c("sp","MASS") 
 pkg.suggests <- "drc" 
 RVersion     <- "R (>= 2.4.1)" 



More information about the Soiltexture-commits mailing list