[Soiltexture-commits] r101 - in pkg/ternaryplot: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 28 16:15:38 CET 2014


Author: jmoeys
Date: 2014-03-28 16:15:38 +0100 (Fri, 28 Mar 2014)
New Revision: 101

Added:
   pkg/ternaryplot/REVISION
   pkg/ternaryplot/man/createTernarySystem.Rd
Modified:
   pkg/ternaryplot/DESCRIPTION
   pkg/ternaryplot/NAMESPACE
   pkg/ternaryplot/R/aa00-ternaryplot-package.R
   pkg/ternaryplot/R/aa01-ternaryplot-options.R
   pkg/ternaryplot/R/aa02-ternaryplot-classes.R
   pkg/ternaryplot/R/aa03-ternaryplot-classes-utility.R
   pkg/ternaryplot/R/aa04-ternarysystems.R
   pkg/ternaryplot/R/aa05-ternarydata.R
   pkg/ternaryplot/R/aa06-ternary2xy.R
   pkg/ternaryplot/R/ternaryplot.R
   pkg/ternaryplot/man/blrLabels-methods.Rd
   pkg/ternaryplot/man/blrNames-methods.Rd
   pkg/ternaryplot/man/createTernaryGeometry.Rd
   pkg/ternaryplot/man/createTernaryVariables.Rd
   pkg/ternaryplot/man/getTernarySystem.Rd
   pkg/ternaryplot/man/ternary2xy-methods.Rd
   pkg/ternaryplot/man/ternaryData-methods.Rd
   pkg/ternaryplot/man/ternaryLims-methods.Rd
   pkg/ternaryplot/man/ternaryWindow-methods.Rd
   pkg/ternaryplot/man/ternaryplot-package.Rd
   pkg/ternaryplot/man/tpPar.Rd
Log:
bug fixes

Modified: pkg/ternaryplot/DESCRIPTION
===================================================================
--- pkg/ternaryplot/DESCRIPTION	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/DESCRIPTION	2014-03-28 15:15:38 UTC (rev 101)
@@ -7,5 +7,4 @@
 Description: Ternary plots and ternary classifications.
 License: AGPL-3
 URL: http://www.slu.se/ckb
-Depends: R (>= 3.0.2), sp
-Imports: MASS
+Depends: R (>= 3.0.2), sp, MASS

Modified: pkg/ternaryplot/NAMESPACE
===================================================================
--- pkg/ternaryplot/NAMESPACE	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/NAMESPACE	2014-03-28 15:15:38 UTC (rev 101)
@@ -16,6 +16,7 @@
 export(blrNames)
 export(createTernaryGeometry)
 export(createTernaryGrid)
+export(createTernarySystem)
 export(createTernaryVariables)
 export(deg2rad)
 export(fracSum)
@@ -38,18 +39,6 @@
 export(ternaryWindow)
 export(tlrAngles)
 export(tpPar)
-exportClasses(ternarySystem)
-importFrom(MASS,"data,")
-importFrom(MASS,"for")
-importFrom(MASS,and)
-importFrom(MASS,classes)
-importFrom(MASS,classification.)
-importFrom(MASS,classifications.)
-importFrom(MASS,kde2d)
-importFrom(MASS,plots)
-importFrom(MASS,S4)
-importFrom(MASS,ternary)
-importFrom(MASS,Ternary)
 S3method("blrClock<-",ternaryGeometry)
 S3method("blrClock<-",ternarySystem)
 S3method("blrLabels<-",ternarySystem)

Modified: pkg/ternaryplot/R/aa00-ternaryplot-package.R
===================================================================
--- pkg/ternaryplot/R/aa00-ternaryplot-package.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/aa00-ternaryplot-package.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -8,10 +8,6 @@
 
 
 
-#'@importFrom MASS kde2d
-
-
-
 #' Ternary plots and ternary classifications.
 #'
 #' Ternary plots and ternary classifications. S4 classes for ternary 

Modified: pkg/ternaryplot/R/aa01-ternaryplot-options.R
===================================================================
--- pkg/ternaryplot/R/aa01-ternaryplot-options.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/aa01-ternaryplot-options.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -148,8 +148,9 @@
 #'@param fracSumTol 
 #'  Single numeric. Tolerance on the sum of the 3 ternary fractions. Overall 
 #'  tolerance is \code{fracSum * fracSumTol}, where \code{fracSum} is the 
-#'  expected sum of the 3 ternary fractions, as given by a 
-#'  \code{\link[ternaryplot]{ternaryGeometry}} or a \code{\link[ternaryplot]{ternarySystem}}.
+#'  expected sum of the 3 ternary fractions. See 
+#'  \code{\link[ternaryplot]{createTernaryGeometry}} or 
+#'  \code{\link[ternaryplot]{createTernarySystem}}.
 #'
 #'@param ticksAt 
 #'  Vector of numeric. Pre-defined position of the tick-marks for the 3 axis.
@@ -230,7 +231,7 @@
 #'
 #'@seealso \code{\link{getTpPar}}.
 #'
-#'@export tpPar
+#'@export 
 #'
 tpPar <- function( 
     par    = NULL, 
@@ -372,7 +373,7 @@
 #'  Return the value of the parameter \code{par}, without the list
 #'  container of \code{\link{tpPar}}.
 #'
-#'@export getTpPar
+#'@export 
 #'
 getTpPar <- function(
     par 

Modified: pkg/ternaryplot/R/aa02-ternaryplot-classes.R
===================================================================
--- pkg/ternaryplot/R/aa02-ternaryplot-classes.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/aa02-ternaryplot-classes.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -373,9 +373,10 @@
 #'@example inst/examples/createTernaryGeometry-example.R
 #'
 #'
-#'@name createTernaryGeometry
+#'@rdname createTernaryGeometry
+#'@aliases ternaryGeometry
 #'
-#'@export createTernaryGeometry
+#'@export
 #'
 createTernaryGeometry <- function(
  tlrAngles  = c( 60, 60, 60 ), 
@@ -433,9 +434,10 @@
 #'@example inst/examples/createTernaryVariables-example.R
 #'
 #'
-#'@name createTernaryVariables
+#'@rdname createTernaryVariables
+#'@aliases ternaryVariables
 #'
-#'@export createTernaryVariables
+#'@export 
 #'
 createTernaryVariables <- function(
  blrNames   = paste0( "F", 1:3 ), 
@@ -518,10 +520,10 @@
 #'@example inst/examples/createTernarySystem-example.R
 #'
 #'
-#'@name ternarySystem-class
+#'@rdname createTernarySystem
+#'@aliases ternarySystem
+#'@export
 #'
-#'@exportClass ternarySystem
-#'
 createTernarySystem <- function(
  ternaryGeometry = NULL, 
  ternaryVariables = NULL, 

Modified: pkg/ternaryplot/R/aa03-ternaryplot-classes-utility.R
===================================================================
--- pkg/ternaryplot/R/aa03-ternaryplot-classes-utility.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/aa03-ternaryplot-classes-utility.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -21,7 +21,7 @@
 #'  A \code{ternarySystem} object, as created with 
 #'  \code{\link[ternaryplot]{createTernarySystem}}, or a 
 #'  \code{ternaryVariables} object, as created with 
-#'  \code{\link[ternaryplot]{ternaryVariables}}.
+#'  \code{\link[ternaryplot]{createTernaryVariables}}.
 #'
 #'@param \dots
 #'  Additional parameters passed to \code{\link[ternaryplot]{ternaryCheck}}.
@@ -136,7 +136,7 @@
 #'  A \code{ternarySystem} object, as created with 
 #'  \code{\link[ternaryplot]{createTernarySystem}}, or a 
 #'  \code{ternaryVariables} object, as created with 
-#'  \code{\link[ternaryplot]{ternaryVariables}}.
+#'  \code{\link[ternaryplot]{createTernaryVariables}}.
 #'
 #'@param \dots
 #'  Additional parameters passed to \code{\link[ternaryplot]{ternaryCheck}}.

Modified: pkg/ternaryplot/R/aa04-ternarysystems.R
===================================================================
--- pkg/ternaryplot/R/aa04-ternarysystems.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/aa04-ternarysystems.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -145,7 +145,7 @@
 #'
 #'
 #'@return 
-#'  A \code{\link[ternaryplot]{ternarySystem}} object.
+#'  A \code{ternarySystem} object.
 #'
 #'
 #'@export 

Modified: pkg/ternaryplot/R/aa05-ternarydata.R
===================================================================
--- pkg/ternaryplot/R/aa05-ternarydata.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/aa05-ternarydata.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -34,7 +34,7 @@
 #'
 #'@param s 
 #'  A \code{ternarySystem} object, as created with 
-#'  \code{\link[ternaryplot]{ternarySystem}}, or a single 
+#'  \code{\link[ternaryplot]{createTernarySystem}}, or a single 
 #'  \code{character} string. Can be missing.
 #'
 #'@param x 

Modified: pkg/ternaryplot/R/aa06-ternary2xy.R
===================================================================
--- pkg/ternaryplot/R/aa06-ternary2xy.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/aa06-ternary2xy.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -30,7 +30,7 @@
 #'
 #'Converts ternary point-data (bottom, left, right axis) into 
 #'  x-y coordinates, according to the specification of a 
-#'  \code{\link[ternaryplot]{ternarySystem}}
+#'  \code{ternarySystem}
 #'
 #'
 #'@param s

Modified: pkg/ternaryplot/R/ternaryplot.R
===================================================================
--- pkg/ternaryplot/R/ternaryplot.R	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/R/ternaryplot.R	2014-03-28 15:15:38 UTC (rev 101)
@@ -21,7 +21,7 @@
 #'
 #'@param s 
 #'  A \code{ternarySystem} object, as created with 
-#'  \code{\link[ternaryplot]{ternarySystem}}, or a single 
+#'  \code{\link[ternaryplot]{createTernarySystem}}, or a single 
 #'  \code{character} string. Can be missing.
 #'
 #'@param x 
@@ -1424,7 +1424,7 @@
 #'@param s 
 #'  Either a character string naming the ternary classification 
 #'  system to be used (if pre-defined) or a  
-#'  \code{\link[ternaryplot]{ternarySystem}} x.
+#'  \code{\link[ternaryplot]{ternarySystem}}, instead of \code{x}.
 #'
 #'@param x 
 #'  A \code{\link[base]{data.frame}} or a \code{\link[base]{matrix}} 

Added: pkg/ternaryplot/REVISION
===================================================================
--- pkg/ternaryplot/REVISION	                        (rev 0)
+++ pkg/ternaryplot/REVISION	2014-03-28 15:15:38 UTC (rev 101)
@@ -0,0 +1 @@
+95:100M

Modified: pkg/ternaryplot/man/blrLabels-methods.Rd
===================================================================
--- pkg/ternaryplot/man/blrLabels-methods.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/blrLabels-methods.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -26,7 +26,7 @@
   \item{s}{A \code{ternarySystem} object, as created with
   \code{\link[ternaryplot]{createTernarySystem}}, or a
   \code{ternaryVariables} object, as created with
-  \code{\link[ternaryplot]{ternaryVariables}}.}
+  \code{\link[ternaryplot]{createTernaryVariables}}.}
 
   \item{\dots}{Additional parameters passed to
   \code{\link[ternaryplot]{ternaryCheck}}.}

Modified: pkg/ternaryplot/man/blrNames-methods.Rd
===================================================================
--- pkg/ternaryplot/man/blrNames-methods.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/blrNames-methods.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -25,7 +25,7 @@
   \item{s}{A \code{ternarySystem} object, as created with
   \code{\link[ternaryplot]{createTernarySystem}}, or a
   \code{ternaryVariables} object, as created with
-  \code{\link[ternaryplot]{ternaryVariables}}.}
+  \code{\link[ternaryplot]{createTernaryVariables}}.}
 
   \item{\dots}{Additional parameters passed to
   \code{\link[ternaryplot]{ternaryCheck}}.}

Modified: pkg/ternaryplot/man/createTernaryGeometry.Rd
===================================================================
--- pkg/ternaryplot/man/createTernaryGeometry.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/createTernaryGeometry.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -1,5 +1,6 @@
 \name{createTernaryGeometry}
 \alias{createTernaryGeometry}
+\alias{ternaryGeometry}
 \title{Creates a ternaryGeometry object: ternary plot geometry definition.}
 \usage{
   createTernaryGeometry(tlrAngles = c(60, 60, 60),

Added: pkg/ternaryplot/man/createTernarySystem.Rd
===================================================================
--- pkg/ternaryplot/man/createTernarySystem.Rd	                        (rev 0)
+++ pkg/ternaryplot/man/createTernarySystem.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -0,0 +1,87 @@
+\name{createTernarySystem}
+\alias{createTernarySystem}
+\alias{ternarySystem}
+\title{Creates a ternarySystem object: ternary plot system definition.}
+\usage{
+  createTernarySystem(ternaryGeometry = NULL,
+    ternaryVariables = NULL, main = character(0),
+    vertices = NULL, classes = NULL, scale = NULL, ...)
+}
+\arguments{
+  \item{ternaryGeometry}{A ternary geometry (as defined by
+  \code{\link[ternaryplot]{createTernaryGeometry}}). If
+  \code{NULL}, use the default output of
+  \code{\link[ternaryplot]{createTernaryGeometry}}.}
+
+  \item{ternaryVariables}{A set of ternary variables (as
+  defined by
+  \code{\link[ternaryplot]{createTernaryVariables}}. If
+  \code{NULL}, use the default output of
+  \code{\link[ternaryplot]{createTernaryVariables}}.}
+
+  \item{main}{Single character string. Title of the
+  triangle plot.}
+
+  \item{vertices}{See \code{\link[ternaryplot]{tpPar}}. If
+  non-null, \code{\link[base]{data.frame}} with 4 columns:
+  \code{id}, and 3 other columns corresponding to
+  \code{blrNames} in \code{ternaryVariables}. If
+  \code{NULL}, default values will be used
+  \code{getTpPar("vertices")}, and the columns names
+  changed to those of \code{ternaryVariables}.}
+
+  \item{classes}{See \code{\link[ternaryplot]{tpPar}}.}
+
+  \item{scale}{See \code{\link[ternaryplot]{tpPar}}. If
+  non-null, \code{\link[base]{data.frame}} with 3 columns,
+  corresponding to \code{blrNames} in
+  \code{ternaryVariables}. If \code{NULL}, default values
+  will be used \code{getTpPar("scale")}, and the columns
+  names changed to those of \code{ternaryVariables}.  NOT
+  USED YET.}
+
+  \item{\dots}{Additional parameters passed to
+  \code{\link[ternaryplot]{ternaryCheck}}}
+}
+\description{
+  Creates a ternarySystem object: ternary plot system
+  definition.
+}
+\details{
+  Ternary systems are a combination of (a) a ternary
+  geometry (as defined by
+  \code{\link[ternaryplot]{createTernaryGeometry}}), (b) a
+  set of ternary variables (as defined by
+  \code{\link[ternaryplot]{createTernaryVariables}} and an
+  optional classification system, that is polygons drawn on
+  top of ternary plots, that define different zones in the
+  fractions.
+
+  The classification is defined by a collection of polygons
+  (in \code{classes}) with different \code{vertices}.
+}
+\examples{
+library( "ternaryplot" ) 
+
+
+## Default variables
+tsy <- createTernarySystem() 
+tsy 
+
+## Custom variables
+tsy2 <- createTernarySystem( 
+    "ternaryVariables" = createTernaryVariables( 
+        "blrNames"  = c( "CLAY", "SILT", "SAND" ), 
+        "blrLabels" = c( "Clay [\%]", "Silt [\%]", "Sand [\%]" ) 
+    ),  
+    "ternaryGeometry" = createTernaryGeometry( 
+        "ternaryGeometry", 
+        "fracSum"   = 100, 
+        "tlrAngles" = c( 45, 45, 90 ) # top, left, right angles
+    ), 
+    "main" = "My ternary plot" ) 
+
+tsy2
+
+}
+

Modified: pkg/ternaryplot/man/createTernaryVariables.Rd
===================================================================
--- pkg/ternaryplot/man/createTernaryVariables.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/createTernaryVariables.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -1,5 +1,6 @@
 \name{createTernaryVariables}
 \alias{createTernaryVariables}
+\alias{ternaryVariables}
 \title{Creates a ternaryVariables object: ternary plot variables definitions.}
 \usage{
   createTernaryVariables(blrNames = paste0("F", 1:3),

Modified: pkg/ternaryplot/man/getTernarySystem.Rd
===================================================================
--- pkg/ternaryplot/man/getTernarySystem.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/getTernarySystem.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -9,7 +9,7 @@
   classification to be fetched.}
 }
 \value{
-  A \code{\link[ternaryplot]{ternarySystem}} object.
+  A \code{ternarySystem} object.
 }
 \description{
   Fetch a pre-defined ternary classification system

Modified: pkg/ternaryplot/man/ternary2xy-methods.Rd
===================================================================
--- pkg/ternaryplot/man/ternary2xy-methods.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/ternary2xy-methods.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -36,6 +36,6 @@
 \description{
   Converts ternary point-data (bottom, left, right axis)
   into x-y coordinates, according to the specification of a
-  \code{\link[ternaryplot]{ternarySystem}}
+  \code{ternarySystem}
 }
 

Modified: pkg/ternaryplot/man/ternaryData-methods.Rd
===================================================================
--- pkg/ternaryplot/man/ternaryData-methods.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/ternaryData-methods.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -14,8 +14,8 @@
 }
 \arguments{
   \item{s}{A \code{ternarySystem} object, as created with
-  \code{\link[ternaryplot]{ternarySystem}}, or a single
-  \code{character} string. Can be missing.}
+  \code{\link[ternaryplot]{createTernarySystem}}, or a
+  single \code{character} string. Can be missing.}
 
   \item{x}{A \code{\link[base]{data.frame}} or a
   \code{\link[base]{matrix}} containing point ternary data

Modified: pkg/ternaryplot/man/ternaryLims-methods.Rd
===================================================================
--- pkg/ternaryplot/man/ternaryLims-methods.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/ternaryLims-methods.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -13,7 +13,8 @@
 \arguments{
   \item{s}{Either a character string naming the ternary
   classification system to be used (if pre-defined) or a
-  \code{\link[ternaryplot]{ternarySystem}} x.}
+  \code{\link[ternaryplot]{ternarySystem}}, instead of
+  \code{x}.}
 
   \item{x}{A \code{\link[base]{data.frame}} or a
   \code{\link[base]{matrix}} containing point ternary data

Modified: pkg/ternaryplot/man/ternaryWindow-methods.Rd
===================================================================
--- pkg/ternaryplot/man/ternaryWindow-methods.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/ternaryWindow-methods.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -14,8 +14,8 @@
 }
 \arguments{
   \item{s}{A \code{ternarySystem} object, as created with
-  \code{\link[ternaryplot]{ternarySystem}}, or a single
-  \code{character} string. Can be missing.}
+  \code{\link[ternaryplot]{createTernarySystem}}, or a
+  single \code{character} string. Can be missing.}
 
   \item{x}{A \code{\link[base]{data.frame}} or a
   \code{\link[base]{matrix}} containing point ternary data

Modified: pkg/ternaryplot/man/ternaryplot-package.Rd
===================================================================
--- pkg/ternaryplot/man/ternaryplot-package.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/ternaryplot-package.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -3,8 +3,12 @@
 \alias{ternaryplot-package}
 \title{Ternary plots and ternary classifications}
 \description{
-  Ternary plots and ternary classifications
+  Ternary plots and ternary classifications.
 }
+\details{
+  Ternary plots and ternary classifications. S4 classes for
+  ternary data, ternary plots and ternary classification.
+}
 \examples{
 # Examples coming later
 }

Modified: pkg/ternaryplot/man/tpPar.Rd
===================================================================
--- pkg/ternaryplot/man/tpPar.Rd	2014-03-28 14:58:55 UTC (rev 100)
+++ pkg/ternaryplot/man/tpPar.Rd	2014-03-28 15:15:38 UTC (rev 101)
@@ -37,9 +37,9 @@
   \item{fracSumTol}{Single numeric. Tolerance on the sum of
   the 3 ternary fractions. Overall tolerance is
   \code{fracSum * fracSumTol}, where \code{fracSum} is the
-  expected sum of the 3 ternary fractions, as given by a
-  \code{\link[ternaryplot]{ternaryGeometry}} or a
-  \code{\link[ternaryplot]{ternarySystem}}.}
+  expected sum of the 3 ternary fractions. See
+  \code{\link[ternaryplot]{createTernaryGeometry}} or
+  \code{\link[ternaryplot]{createTernarySystem}}.}
 
   \item{ticksAt}{Vector of numeric. Pre-defined position of
   the tick-marks for the 3 axis.  Between 0 and 'fracSum'



More information about the Soiltexture-commits mailing list