Package 'AQuality'

Title: Water and Measurements Quality
Description: The functions proposed in this package allows to graphically evaluate the process of measurement of the chemical components of water. TSSS() and ICHS functions are useful to control the quality of measurements of chemical components of a sample of water. If one or more measurements include an error, the generated graph will indicate it with a position of the point that represents the sample outside the confidence interval.
Authors: Maela Lupo [aut, cre], Andrea Porpatto [aut], Alfredo Rigalli [aut]
Maintainer: Maela Lupo <[email protected]>
License: GPL-2
Version: 1.1
Built: 2024-11-23 05:02:27 UTC
Source: https://github.com/cran/AQuality

Help Index


Water and Measurements Quality

Description

The package allows you tu evaluate graphically the quality of measurements of water components

Details

The package includes two functions: TSSS() and ICHS(). The TSSS()function allows evaluating the quality of a set of measurement of water components, which correlate with total soluble solids. On the other hand, the ICHS() function allows evaluating the quality of a set of measurement of water components, which correlate with conductivity

Author(s)

Maela Lupo [aut, cre], Andrea Porpatto [aut], Alfredo Rigalli [aut] Maintainer: Maela Lupo email: [email protected]


Data Sets

Description

Data.frame with data for testing the ICHS() (Ionic Charge Summation) function. Column 1: sample identification code. Column 2: measurement of water conductivity. Column3 onwards: measurement of ionic chemical components of water expressed in milliequivalent per litre.

Usage

data("dataICHS")

Format

A data frame with 411 observations on the following 14 variables.

codigo

a character vector

conductividad

a numeric vector

cargacloruro

a numeric vector

cargacarbonato

a numeric vector

cargabicarbonato

a numeric vector

cargafosfato

a numeric vector

carganitrato

a numeric vector

carganitrito

a numeric vector

cargafloruro

a numeric vector

cargaarcenico

a numeric vector

cargaamonio

a numeric vector

cargasulfato

a numeric vector

cargasodio

a numeric vector

cargacalcio

a numeric vector

Examples

# Including data.frame: data in workspace.
data("dataICHS")
# Column names of data.frame: data
names(dataICHS) 
# Data set type of columns of data.frame: data.
str(dataICHS)
# Visualization of sample A45
#The following code should display a graphic with all samples in green dots and sample
# A45 as red big dot
ICHS("A45",dataICHS)

Data Sets~~

Description

Data.frame with data for testing the TSSS() (total soluble solids summation) function. Column 1: sample identification code. Column 2: measurement of total soluble solids. Column3 onwards: measurement of chemical components of water expressed in the same units as column 2.

Usage

data("dataTSSS")

Format

A data frame with 411 observations on the following 16 variables.

codigo

a character vector

solidostotales

a numeric vector

cloruro

a numeric vector

carbonato

a numeric vector

bicarbonato

a numeric vector

fosfato

a numeric vector

nitrato

a numeric vector

nitrito

a numeric vector

fluoruro

a numeric vector

arsenico

a numeric vector

amonio

a numeric vector

sulfato

a numeric vector

sodio

a numeric vector

tkn

a numeric vector

calcio

a numeric vector

magnesio

a numeric vector

Examples

# Including data.frame: data in workspace.
data("dataTSSS")
# Column names of data.frame: data
names(dataTSSS) 
# Data set type of columns of data.frame: data.
str(dataTSSS)
# Visualization of sample A45
#The following code should display a graphic with all samples in green dots and sample
# A45 as red big dot
TSSS("A45",dataTSSS)

Ionic Charge Summation

Description

Plots ionic charge summation as a function of conductivity.

Usage

ICHS(sample, data, conflevel = 0.95, pchdata = 19, coldata = "green", cexdata = 0.5,
 pchsample = 19, colsample = "red", cexsample = 3, xaxis = "CONDUCTIVITY", 
yaxis = "IONIC CHARGE SUMMATION", title = paste("Sample ", as.character(sample)),
 linetyprediction = 2, linewidthprediction = 1, linecolorprediction = 5)

Arguments

sample

Code of the sample whose quality you want to know.

data

Data.frame containing code of the database samples, conductivity, measurements of ionic water components.

conflevel

Significance level used in the predict function.

pchdata

Symbol used to graph all the data in the data.frame.

coldata

Color of the symbols of all the data in the data.frame.

cexdata

Symbol size of all data in the data frame.

pchsample

Symbol chosen to represent the point whose measurement quality is to be represented.

colsample

Color chosen to represent the point whose measurement quality is to be represented.

cexsample

Size of the symbol chosen to represent the point whose measurement quality is to be represented.

xaxis

X axis label.

yaxis

Y axis label.

title

Title of the graph including the code of the chosen sample.

linetyprediction

Linear model prediction line type.

linewidthprediction

Linear model prediction line thickness.

linecolorprediction

Linear model prediction line color.

Details

The ICHS() function performs a linear model using column 2 (conductivity) as the independent variable and the other components of water as dependent variables (columns 3 onwards). Based on the linear model, a data prediction interval is obtained with a certain confidence level (conflevel). Then, ICHS() graphs the values of the entire database and finally graphs as a point with different color, the sample whose measurement quality you want to observe.

Value

The ICHS() function returns a graph of the sum of ionic chemical components as a function of the measurement of conductivity for each sample. It contains the confidence interval indicated in a dotted line, and the sample under observation. If the point that represents the sample is within the region delimited by the lines of the confidence interval, it is presumed that there were no serious measurement errors of the components analyzed.

Author(s)

Maela Lupo, Andrea Porpatto, Alfredo Rigalli


Total Soluble Solids Summation

Description

Plot total soluble solids summation as a function of total soluble solids measurement.

Usage

TSSS(sample, data, conflevel = 0.95, pchdata = 19, coldata = "green", cexdata = 0.5,
pchsample = 19, colsample = "red", cexsample = 3, xaxis = "TOTAL SOLUBLE SOLIDS",
yaxis = "MASS SUMMATION", title = paste("Sample ", as.character(sample)), 
linetyprediction = 2, linewidthprediction = 1, linecolorprediction = 5)

Arguments

sample

Code of the sample whose quality you want to know.

data

Data.frame containing code of the database samples, total soluble solids, measurements of other water components.

conflevel

Significance level used in the predict function.

pchdata

Symbol used to graph all the data in the data.frame.

coldata

Color of the symbols of all the data in the data.frame.

cexdata

Symbol size of all data in the data frame.

pchsample

Symbol chosen to represent the point whose measurement quality is to be represented.

colsample

Color chosen to represent the point whose measurement quality is to be represented.

cexsample

Size of the symbol chosen to represent the point whose measurement quality is to be represented.

xaxis

X axis label.

yaxis

Y axis label.

title

Title of the graph including the code of the chosen sample.

linetyprediction

Linear model prediction line type.

linewidthprediction

Linear model prediction line thickness.

linecolorprediction

Linear model prediction line color.

Details

The TSSS() function performs a linear model using column 2 (total soluble solids) as the dependent variable and the other components of water as independent variables (columns 3 onwards). Based on the linear model, a data prediction interval is obtained with a certain confidence level (conflevel). Then, TSSS() graphs the values of the entire database and finally graphs as a point with different color, the sample whose measurement quality you want to observe.

Value

The TSSS() function returns a graph of the sum of soluble solids as a function of the measurement of total soluble solids for each sample. It contains the confidence interval and the sample under observation indicated in a dotted line. If the point that represents the sample is within the region delimited by the lines of the confidence interval, it is presumed that there were no serious measurement errors of the components analyzed.

Author(s)

Maela Lupo, Andrea Porpatto, Alfredo Rigalli