Last data update: 2014.03.03

R: Function to check data consistency.
check.dataR Documentation

Function to check data consistency.

Description

The input data matrix (X), number of end-members (q), weight transformation limits (l) and constant sum scaling parameter (c) are checked for consistency. This includes checking for absence of missing values, columns containing only zero-values and for numeric data type of variables. Furthermore, a check tests if l is below the maximum possible value, preventing numerical instability prior to factor rotation.

Usage

check.data(X, q, l, c, invisible = TRUE, ...)

Arguments

X

Numeric matrix with m samples (rows) and n variables (columns).

q

Numeric scalar with number of end-members to be modelled.

l

Numeric scalar or vector specifying the weight transformation limit, i.e. quantile.

c

Numeric scalar specifying the constant sum scaling parameter, e.g. 1, 100, 1000.

invisible

Logical scalar setting visibility option.

...

Further arguments passed to the function.

Value

Character vector with test results.

Author(s)

Michael Dietze, Elisabeth Dietze

References

Dietze E, Hartmann K, Diekmann B, IJmker J, Lehmkuhl F, Opitz S, Stauch G, Wuennemann B, Borchers A. 2012. An end-member algorithm for deciphering modern detrital processes from lake sediments of Lake Donggi Cona, NE Tibetan Plateau, China. Sedimentary Geology 243-244: 169-180.

See Also

EMMA

Examples

## load example data set
data(X, envir = environment())

## perform data set check
check.data(X = X,
           q = 6,
           l = seq(from = 0,
                   to = 0.2,
                   by = 0.01),
           c = 1)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(EMMAgeo)
Loading required package: GPArotation
Loading required package: limSolve
Loading required package: shape
Loading required package: shiny
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/EMMAgeo/check.data.Rd_%03d_medium.png", width=480, height=480)
> ### Name: check.data
> ### Title: Function to check data consistency.
> ### Aliases: check.data
> ### Keywords: EMMA
> 
> ### ** Examples
> 
> ## load example data set
> data(X, envir = environment())
> 
> ## perform data set check
> check.data(X = X,
+            q = 6,
+            l = seq(from = 0,
+                    to = 0.2,
+                    by = 0.01),
+            c = 1)
[1] "Data matrix passed test... OK"                                                                                                                                                                                                                                                                                                                                                                                                                                         
[2] "End-member vector passed test... OK"                                                                                                                                                                                                                                                                                                                                                                                                                                   
[3] "Weight transformation limit vector passed test... OK"                                                                                                                                                                                                                                                                                                                                                                                                                  
[4] "Scaling parameter passed test... OK"                                                                                                                                                                                                                                                                                                                                                                                                                                   
[5] "NA-test passed... OK"                                                                                                                                                                                                                                                                                                                                                                                                                                                  
[6] "Test for zero-only values passed... OK"                                                                                                                                                                                                                                                                                                                                                                                                                                
[7] "Maximum weight transformation limit value passed test... OK"                                                                                                                                                                                                                                                                                                                                                                                                           
[8] "    Note: the following rows do not sum up to the specified c: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100."
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>