[Soiltexture-commits] r7 - / pkg pkg/soiltexture pkg/soiltexture/R pkg/soiltexture/man pkg/soiltexture/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 16 15:33:36 CEST 2010


Author: jmoeys
Date: 2010-04-16 15:33:36 +0200 (Fri, 16 Apr 2010)
New Revision: 7

Added:
   package_source_test.R
   pkg/soiltexture.Rcheck.zip
   pkg/soiltexture_1.0.tar.gz
   pkg/soiltexture_1.0.zip
   soiltexture_compile.R
Removed:
   soiltexture_Install.R
Modified:
   pkg/soiltexture/DESCRIPTION
   pkg/soiltexture/R/soiltexture.r
   pkg/soiltexture/man/TT.env.Rd
   pkg/soiltexture/man/TT.plot.Rd
   pkg/soiltexture/man/soiltexture-package.Rd
   pkg/soiltexture/tests/TT.plot.R
Log:


Added: package_source_test.R
===================================================================
--- package_source_test.R	                        (rev 0)
+++ package_source_test.R	2010-04-16 13:33:36 UTC (rev 7)
@@ -0,0 +1 @@
+source( "C:/_RTOOLS/SWEAVE_WORK/SOIL_TEXTURES/rforge/pkg/soiltexture/R/soiltexture.r" ) 

Modified: pkg/soiltexture/DESCRIPTION
===================================================================
--- pkg/soiltexture/DESCRIPTION	2010-04-09 17:10:13 UTC (rev 6)
+++ pkg/soiltexture/DESCRIPTION	2010-04-16 13:33:36 UTC (rev 7)
@@ -1,6 +1,6 @@
 Package: soiltexture
 Version: 1.0
-Date: 2010-04-08
+Date: 2010-04-16
 Title: Functions for soil texture plot, classification and transformation
 Author: Julien MOEYS <jules_m78-soiltexture at yahoo.fr> 
 Maintainer: Julien MOEYS <jules_m78-soiltexture at yahoo.fr> 

Modified: pkg/soiltexture/R/soiltexture.r
===================================================================
--- pkg/soiltexture/R/soiltexture.r	2010-04-09 17:10:13 UTC (rev 6)
+++ pkg/soiltexture/R/soiltexture.r	2010-04-16 13:33:36 UTC (rev 7)
@@ -51,12 +51,6 @@
 # |                                                                         |
 # +-------------------------------------------------------------------------+
 # |                                                                         |
-# | Content (Alphabetical list of functions and objects):                   |
-# | -   (to be replaced by a proper R documentation)                        |
-# |                                                                         |
-# |                                                                         |
-# +-------------------------------------------------------------------------+
-# |                                                                         |
 # | FEATURES list:                                                          |
 # | -   Create ternary/triangle plot of point variables defined by a        |
 # |     triplet of variable (which sum to a constant).                      |
@@ -871,6 +865,120 @@
             unit.tx         = quote(bold('%')), 
             #
             text.sum        = 100 
+        ),  #
+        # 
+        CA.FR.TT = list( # Canadian TRIANGLE PARAMETERS : (added 2010-04-16) 
+            #
+            main            = "Canada (CA)", 
+            #
+            #                 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-   
+            "tt.points"     = data.frame( 
+                "CLAY"      = c( 1.000, 0.600, 0.600, 0.550, 0.400, 0.400, 0.400, 0.350, 0.350, 0.270, 0.270, 
+                                 0.270, 0.270, 0.200, 0.200, 0.120, 0.120, 0.150, 0.100, 0.070, 0.070, 0.000, 
+                                 0.000, 0.000, 0.000, 0.000, 0.000 ),   
+                "SILT"      = c( 0.000, 0.400, 0.000, 0.000, 0.600, 0.400, 0.150, 0.200, 0.000, 0.730, 0.530, 
+                                 0.500, 0.280, 0.280, 0.000, 0.880, 0.800, 0.000, 0.000, 0.500, 0.410, 1.000, 
+                                 0.800, 0.500, 0.300, 0.150, 0.000 ),   
+                "SAND"      = c( 0.000, 0.000, 0.400, 0.450, 0.000, 0.200, 0.450, 0.450, 0.650, 0.000, 0.200, 
+                                 0.230, 0.450, 0.520, 0.800, 0.000, 0.080, 0.850, 0.900, 0.430, 0.520, 0.000, 
+                                 0.200, 0.500, 0.700, 0.850, 1.000 )    
+                #                http://sis.agr.gc.ca/cansis/glossary/texture,_soil.html
+            ),  #
+            # 
+            #   Abreviations;       Names of the texture cl;    Points marking the class limits (points specified above)
+            "tt.polygons"   = list( 
+                "ALo"  = list( "name" = "Argile lourde",         "points" = c( 01, 02, 03 ) ), 
+                "ALi"  = list( "name" = "Argile limoneuse",      "points" = c( 02, 05, 06 ) ), 
+                "A"    = list( "name" = "Argile",                "points" = c( 02, 03, 04, 07, 06 ) ), 
+                "AS"   = list( "name" = "Argile sableuse",       "points" = c( 04, 07, 08, 09 ) ), 
+                "LLiA" = list( "name" = "Loam limono-argileux",  "points" = c( 05, 06, 11, 10 ) ), 
+                "LA"   = list( "name" = "Loam argileux",         "points" = c( 06, 07, 08, 13, 12, 11 ) ), 
+                "LSA"  = list( "name" = "Loam sablo-argileux",   "points" = c( 08, 09, 15, 14, 13 ) ), 
+                "LLi"  = list( "name" = "Loam limoneux",         "points" = c( 10, 11, 12, 20, 24, 23, 17, 16 ) ), 
+                "L"    = list( "name" = "Loam",                  "points" = c( 12, 13, 14, 21, 20 ) ), 
+                "LS"   = list( "name" = "Loam sableux",          "points" = c( 14, 15, 18, 25, 24, 20, 21 ) ), 
+                "SL"   = list( "name" = "Sable loameux",         "points" = c( 18, 19, 26, 25 ) ), 
+                "Li"   = list( "name" = "Limon",                 "points" = c( 16, 17, 23, 22 ) ), 
+                "S"    = list( "name" = "Sable",                 "points" = c( 19, 27, 26 ) )  
+                #
+            ),  #
+            #
+            # Triangle specific parameters for triangle geometry / appearance
+            #   See general parameters above for detailed description of them
+            blr.clock       = c(F,T,NA), 
+            tlr.an          = c(45,90,45), 
+            #
+            blr.tx      = c("SAND","CLAY","SILT"), 
+            # 
+            base.css.ps.lim = c(0,2,50,2000), # http://sis.agr.gc.ca/cansis/glossary/separates,_soil.html
+            tri.css.ps.lim  = c(0,2,50,2000), 
+            # 
+            unit.ps         = quote(bold(mu) * bold('m')), 
+            unit.tx         = quote(bold('%')), 
+            #
+            text.sum        = 100 
+        ),  #
+        #
+        CA.EN.TT = list( # Canadian TRIANGLE PARAMETERS : (added 2010-04-16) 
+            #
+            main            = "Canada (CA)", 
+            #
+            #                 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-   
+            "tt.points"     = data.frame( 
+                "CLAY"      = c( 1.000, 0.600, 0.600, 0.550, 0.400, 0.400, 0.400, 0.350, 0.350, 0.270, 0.270, 
+                                 0.270, 0.270, 0.200, 0.200, 0.120, 0.120, 0.150, 0.100, 0.070, 0.070, 0.000, 
+                                 0.000, 0.000, 0.000, 0.000, 0.000 ),   
+                "SILT"      = c( 0.000, 0.400, 0.000, 0.000, 0.600, 0.400, 0.150, 0.200, 0.000, 0.730, 0.530, 
+                                 0.500, 0.280, 0.280, 0.000, 0.880, 0.800, 0.000, 0.000, 0.500, 0.410, 1.000, 
+                                 0.800, 0.500, 0.300, 0.150, 0.000 ),   
+                "SAND"      = c( 0.000, 0.000, 0.400, 0.450, 0.000, 0.200, 0.450, 0.450, 0.650, 0.000, 0.200, 
+                                 0.230, 0.450, 0.520, 0.800, 0.000, 0.080, 0.850, 0.900, 0.430, 0.520, 0.000, 
+                                 0.200, 0.500, 0.700, 0.850, 1.000 )    
+                #                http://sis.agr.gc.ca/cansis/glossary/texture,_soil.html
+            ),  #
+            # 
+            #   Abreviations;       Names of the texture cl;    Points marking the class limits (points specified above)
+            "tt.polygons"   = list( 
+                "HCl"    = list( "name" = "Heavy clay",       "points" = c( 01, 02, 03 ) ), 
+                "SiCl"   = list( "name" = "Silty clay",       "points" = c( 02, 05, 06 ) ), 
+                "Cl"     = list( "name" = "Clay",             "points" = c( 02, 03, 04, 07, 06 ) ), 
+                "SaCl"   = list( "name" = "Sandy clay",       "points" = c( 04, 07, 08, 09 ) ), 
+                "SiClLo" = list( "name" = "Silty clay loam",  "points" = c( 05, 06, 11, 10 ) ), 
+                "ClLo"   = list( "name" = "Clay loam",        "points" = c( 06, 07, 08, 13, 12, 11 ) ), 
+                "SaClLo" = list( "name" = "Sandy clay loam",  "points" = c( 08, 09, 15, 14, 13 ) ), 
+                "SiLo"   = list( "name" = "Silty loam",       "points" = c( 10, 11, 12, 20, 24, 23, 17, 16 ) ), 
+                "L"      = list( "name" = "Loam",             "points" = c( 12, 13, 14, 21, 20 ) ), 
+                "SaLo"   = list( "name" = "Sandy loam",       "points" = c( 14, 15, 18, 25, 24, 20, 21 ) ), 
+                "LoSa"   = list( "name" = "Loamy sand",       "points" = c( 18, 19, 26, 25 ) ), 
+                "Si"     = list( "name" = "Silt",             "points" = c( 16, 17, 23, 22 ) ), 
+                "Sa"     = list( "name" = "Sand",             "points" = c( 19, 27, 26 ) )  
+                #
+            ),  #
+            #
+            # Triangle specific parameters for triangle geometry / appearance
+            #   See general parameters above for detailed description of them
+            blr.clock       = c(F,T,NA), 
+            tlr.an          = c(45,90,45), 
+            #
+            blr.tx      = c("SAND","CLAY","SILT"), 
+            # 
+            base.css.ps.lim = c(0,2,50,2000), # http://sis.agr.gc.ca/cansis/glossary/separates,_soil.html
+            tri.css.ps.lim  = c(0,2,50,2000), 
+            # 
+            unit.ps         = quote(bold(mu) * bold('m')), 
+            unit.tx         = quote(bold('%')), 
+            #
+            text.sum        = 100 
         )   #
         #
         # +-------------------------------------------------------------------------+
@@ -4342,7 +4450,9 @@
 ### of the Aisne region soil survey), "FR.GEPPA.TT" (French GEPPA 
 ### texture triangle), "DE.BK94.TT" (German texture triangle), 
 ### "UK.SSEW.TT" (Soil Survey of England and Wales), "AU.TT" 
-### (Australian texture triangle), "BE.TT" (Belgium texture triangle).
+### (Australian texture triangle), "BE.TT" (Belgium texture triangle), 
+### "CA.EN.TT" (Canadian texture triangle, with English class abbreviations) and 
+### "CA.FR.TT" (Canadian texture triangle, with French class abbreviations).
 
  class.lab.show=NULL,
 ### Single text string. If equal to "abr" (default) or "full", labels 

Modified: pkg/soiltexture/man/TT.env.Rd
===================================================================
--- pkg/soiltexture/man/TT.env.Rd	2010-04-09 17:10:13 UTC (rev 6)
+++ pkg/soiltexture/man/TT.env.Rd	2010-04-16 13:33:36 UTC (rev 7)
@@ -7,7 +7,7 @@
 \usage{TT.env}
 \format{
   The format is:
-<environment: 0x02c3e128> 
+<environment: 0x03ec25f8> 
 }
 \details{
 }

Modified: pkg/soiltexture/man/TT.plot.Rd
===================================================================
--- pkg/soiltexture/man/TT.plot.Rd	2010-04-09 17:10:13 UTC (rev 6)
+++ pkg/soiltexture/man/TT.plot.Rd	2010-04-16 13:33:36 UTC (rev 7)
@@ -251,7 +251,9 @@
 of the Aisne region soil survey), "FR.GEPPA.TT" (French GEPPA 
 texture triangle), "DE.BK94.TT" (German texture triangle), 
 "UK.SSEW.TT" (Soil Survey of England and Wales), "AU.TT" 
-(Australian texture triangle), "BE.TT" (Belgium texture triangle).}
+(Australian texture triangle), "BE.TT" (Belgium texture triangle), 
+"CA.EN.TT" (Canadian texture triangle, with English class abbreviations) and 
+"CA.FR.TT" (Canadian texture triangle, with French class abbreviations).}
   \item{class.lab.show}{Single text string. If equal to "abr" (default) or "full", labels 
 are drawn inside texture class polygons with their full name 
 ("full") or abbreviated name ("abr"). If equal to "none", no label 
@@ -344,8 +346,10 @@
 
 \seealso{
 }
-\examples{# ::: Texture triangles without data
+\examples{require( soiltexture ) 
 
+# ::: Texture triangles without data
+
 # :: Base plot (FAO triangle) 
 TT.plot() 
 
@@ -395,4 +399,19 @@
     z.name      = "Z", 
     main        = "Soil texture triangle and Z bubble plot" 
 )   #
+
+# ::: Test all the texture triangles
+
+TT.plot( class.sys = "none" )           # no classification 
+TT.plot( class.sys = "FAO50.TT" )       # FAO 
+TT.plot( class.sys = "USDA.TT" )        # USDA 
+TT.plot( class.sys = "FR.AISNE.TT" )    # French Aisne 
+TT.plot( class.sys = "FR.GEPPA.TT" )    # French GEPPA 
+TT.plot( class.sys = "DE.BK94.TT" )     # Germany 
+TT.plot( class.sys = "UK.SSEW.TT" )     # UK 
+TT.plot( class.sys = "BE.TT" )          # Belgium 
+TT.plot( class.sys = "CA.FR.TT" )       # Canada (fr) 
+TT.plot( class.sys = "CA.EN.TT" )       # Canada (en) 
+TT.plot( class.sys = "AU.TT" )          # Australian 
+
 }

Modified: pkg/soiltexture/man/soiltexture-package.Rd
===================================================================
--- pkg/soiltexture/man/soiltexture-package.Rd	2010-04-09 17:10:13 UTC (rev 6)
+++ pkg/soiltexture/man/soiltexture-package.Rd	2010-04-16 13:33:36 UTC (rev 7)
@@ -16,7 +16,7 @@
 \details{
 \tabular{ll}{Package: \tab soiltexture\cr
 Version: \tab 1.0\cr
-Date: \tab 2010-04-08\cr
+Date: \tab 2010-04-16\cr
 Title: \tab Functions for soil texture plot, classification and transformation\cr
 Author: \tab Julien MOEYS <jules_m78-soiltexture at yahoo.fr>\cr
 Maintainer: \tab Julien MOEYS <jules_m78-soiltexture at yahoo.fr>\cr

Modified: pkg/soiltexture/tests/TT.plot.R
===================================================================
--- pkg/soiltexture/tests/TT.plot.R	2010-04-09 17:10:13 UTC (rev 6)
+++ pkg/soiltexture/tests/TT.plot.R	2010-04-16 13:33:36 UTC (rev 7)
@@ -1,3 +1,5 @@
+require( soiltexture ) 
+
 # ::: Texture triangles without data
 
 # :: Base plot (FAO triangle) 
@@ -50,3 +52,18 @@
     main        = "Soil texture triangle and Z bubble plot" 
 )   #
 
+# ::: Test all the texture triangles
+
+TT.plot( class.sys = "none" )           # no classification 
+TT.plot( class.sys = "FAO50.TT" )       # FAO 
+TT.plot( class.sys = "USDA.TT" )        # USDA 
+TT.plot( class.sys = "FR.AISNE.TT" )    # French Aisne 
+TT.plot( class.sys = "FR.GEPPA.TT" )    # French GEPPA 
+TT.plot( class.sys = "DE.BK94.TT" )     # Germany 
+TT.plot( class.sys = "UK.SSEW.TT" )     # UK 
+TT.plot( class.sys = "BE.TT" )          # Belgium 
+TT.plot( class.sys = "CA.FR.TT" )       # Canada (fr) 
+TT.plot( class.sys = "CA.EN.TT" )       # Canada (en) 
+TT.plot( class.sys = "AU.TT" )          # Australian 
+
+

Added: pkg/soiltexture.Rcheck.zip
===================================================================
(Binary files differ)


Property changes on: pkg/soiltexture.Rcheck.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: pkg/soiltexture_1.0.tar.gz
===================================================================
(Binary files differ)


Property changes on: pkg/soiltexture_1.0.tar.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: pkg/soiltexture_1.0.zip
===================================================================
(Binary files differ)


Property changes on: pkg/soiltexture_1.0.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: soiltexture_Install.R
===================================================================
--- soiltexture_Install.R	2010-04-09 17:10:13 UTC (rev 6)
+++ soiltexture_Install.R	2010-04-16 13:33:36 UTC (rev 7)
@@ -1,53 +0,0 @@
-rm(list=ls(all=TRUE)) 
-wrapper.path <- "C:/_RTOOLS/SWEAVE_WORK/SOIL_TEXTURES/soiltexture/trunk/R_CMD_wrapper.R"
-pkg.dir      <- "C:/_RTOOLS/SWEAVE_WORK/SOIL_TEXTURES/soiltexture/trunk" 
-pkg.name     <- "soiltexture" 
-code.files   <- "soiltexture.r" 
-pkg.version  <- "1.0" 
-pkg.depends  <- c("sp","MASS") 
-
-
-
-source( wrapper.path )  
-
-
-
-package.skeleton.dx( 
-    pkgdir     = file.path( pkg.dir, pkg.name ), 
-    code_files = code.files 
-    # code_files = file.path( pkg.dir, pkg.name, "R", code.files ) 
-)   #
-
-
-
-pkg.remove.wrapper( pkg.name = pkg.name ) 
-
-
-
-# Change the description file:
-pkg.description( pkg.name = pkg.name, pkg.dir = pkg.dir, 
-                 pkg.version = pkg.version, pkg.depends = pkg.depends ) 
-
-
-
-# Build the package
-pkg.build.wrapper( pkg.name = pkg.name, pkg.dir = pkg.dir ) 
-
-
-
-# Install the package:
-pkg.install.wrapper( pkg.name = pkg.name, pkg.dir = pkg.dir ) 
-
-
-
-# Check the package
-date() 
-pkg.check.wrapper( pkg.name = pkg.name, pkg.dir = pkg.dir ) 
-date() 
-
-
-
-# Re-install and load the package from the new zip archive:
-install.packages.zip( pkg.name = pkg.name, pkg.dir = pkg.dir, pkg.version = pkg.version ) 
-require( package = pkg.name, character.only = TRUE ) 
-

Added: soiltexture_compile.R
===================================================================
--- soiltexture_compile.R	                        (rev 0)
+++ soiltexture_compile.R	2010-04-16 13:33:36 UTC (rev 7)
@@ -0,0 +1,53 @@
+rm(list=ls(all=TRUE)) 
+wrapper.path <- "C:/_RTOOLS/SWEAVE_WORK/SOIL_TEXTURES/rforge/R_CMD_wrapper.R"
+pkg.dir      <- "C:/_RTOOLS/SWEAVE_WORK/SOIL_TEXTURES/rforge/pkg" 
+pkg.name     <- "soiltexture" 
+code.files   <- "soiltexture.r" 
+pkg.version  <- "1.0" 
+pkg.depends  <- c("sp","MASS") 
+
+
+
+source( wrapper.path )  
+
+
+
+package.skeleton.dx( 
+    pkgdir     = file.path( pkg.dir, pkg.name ), 
+    code_files = code.files 
+    # code_files = file.path( pkg.dir, pkg.name, "R", code.files ) 
+)   #
+
+
+
+pkg.remove.wrapper( pkg.name = pkg.name ) 
+
+
+
+# Change the description file:
+pkg.description( pkg.name = pkg.name, pkg.dir = pkg.dir, 
+                 pkg.version = pkg.version, pkg.depends = pkg.depends ) 
+
+
+
+# Build the package
+pkg.build.wrapper( pkg.name = pkg.name, pkg.dir = pkg.dir ) 
+
+
+
+# Install the package:
+pkg.install.wrapper( pkg.name = pkg.name, pkg.dir = pkg.dir ) 
+
+
+
+# Check the package
+date() 
+pkg.check.wrapper( pkg.name = pkg.name, pkg.dir = pkg.dir ) 
+date() 
+
+
+
+# Re-install and load the package from the new zip archive:
+install.packages.zip( pkg.name = pkg.name, pkg.dir = pkg.dir, pkg.version = pkg.version ) 
+require( package = pkg.name, character.only = TRUE ) 
+



More information about the Soiltexture-commits mailing list