Type: | Package |
Title: | Data Analysis of Liquid-Liquid Systems using R |
Version: | 0.0.3.1 |
Date: | 2021-03-01 |
Author: | Diego F Coelho <diegofcoelho@gmail.com> [aut, cre], Pedro Vitor Oliveira Menezes <pedrod841@hotmail.com> [dtc], Carla Corina dos Santos Porto <carlacorina@hotmail.com.br> [dtc], Jon George Huddleston <Jonathan.Huddleston@brunel.ac.uk> [rev], Elias Basile Tambourgi <eliastam@feq.unicamp.br> [rev] |
Maintainer: | Diego F Coelho <diegofcoelho@gmail.com> |
Description: | Originally design to characterise Aqueous Two Phase Systems, LLSR provide a simple way to analyse experimental data and obtain phase diagram parameters, among other properties, systematically. The package will include (every other update) new functions in order to comprise useful tools in liquid-liquid extraction research. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | TRUE |
Depends: | R (≥ 3.5) |
Imports: | rootSolve, openxlsx, digest, svDialogs, minpack.lm, ggplot2, svglite, dplyr, nleqslv, crayon |
URL: | https://CRAN.R-project.org/package=LLSR |
BugReports: | https://github.com/diegofcoelho/LLSR/issues |
Suggests: | testthat |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2021-02-17 16:58:49 UTC; dfcoelho |
Repository: | CRAN |
Date/Publication: | 2021-02-17 18:20:02 UTC |
Search function for ATPS Systems data
Description
This function allow the user to search the LLSR database to find any ATPS that matches the used criteria.
This function allow the user to search the package database to find any ATPS that matches the available criteria.
Usage
AQSearch(db = LLSR::llsr_data, ...)
## Default S3 method:
AQSearch(
db = LLSR::llsr_data,
db.CompA = NULL,
db.CompB = NULL,
db.CompC = NULL,
db.Temp = NULL,
db.ph = NULL,
db.uid = NULL,
stacked = FALSE,
...
)
Arguments
db |
A highly structure db containing data from previously analised data. LLSR database is used by default but user may input his own db if formatted properly. |
... |
Additional optional arguments. None are used at present. |
db.CompA |
A String variable containing either the CAS, chemical formula or name of the upper phase enriched component.. |
db.CompB |
A String variable containing either the CAS, chemical formula or name of the lower phase component. |
db.CompC |
A String variable containing either the CAS, chemical formula or name of the additive component. |
db.Temp |
A numeric variable containing the Temperature (in Kelvin) to be searched within DB. |
db.ph |
A numeric variable containing the pH to be searched within DB. |
db.uid |
An Unique md5 hash Identification. User can retrieve data for a specific system if in possesion of its UID. |
stacked |
A boolean variable used to return value as a nested list or a data.frame. Used internally to organize data output. |
Details
The function return the systems that matches the criteria submitted by the user.
Value
Returns a data.frame containing system's parameters which match searched conditions
Examples
## Not run:
AQSearch(db.CompA="Ammonium")
## End(Not run)
Search function for ATPS Systems data
Description
This function allow the user to search the package database to find any ATPS that matches the available criteria.
Usage
## S3 method for class 'Binodal'
AQSearch(
db = LLSR::llsr_data,
db.CompA = NULL,
db.CompB = NULL,
db.CompC = NULL,
db.Temp = NULL,
db.ph = NULL,
db.uid = NULL,
stacked = FALSE,
...
)
Arguments
db |
A highly structure db containing data from previously analyzed data. LLSR database is used by default but user may input his own db if formatted properly. |
db.CompA |
A String variable containing either the CAS, chemical formula or name of the upper phase enriched component.. |
db.CompB |
A String variable containing either the CAS, chemical formula or name of the lower phase component. |
db.CompC |
A String variable containing either the CAS, chemical formula or name of the additive component. |
db.Temp |
A numeric variable containing the Temperature (in Kelvin) to be searched within DB. |
db.ph |
A numeric variable containing the pH to be searched within DB. |
db.uid |
An Unique md5 hash Identification. User can retrieve data for a specific system if in possesion of its UID. |
stacked |
A boolean variable used to return value as a nested list or a data.frame. Used internally to organize data output. |
... |
Additional optional arguments. None are used at present. |
Details
The function return the systems that matches the criteria submitted by the user.
Value
Returns a data.frame containing system's parameters which match searched conditions
Examples
## Not run:
AQSearch.Binodal(db.CompA="Ammonium")
## End(Not run)
Search function for ATPS Systems data
Description
This function allow the user to search the package database to find any ATPS that matches the available criteria.
Usage
## S3 method for class 'Parameter'
AQSearch(
db = LLSR::llsr_data,
db.CompA = NULL,
db.CompB = NULL,
db.CompC = NULL,
db.Temp = NULL,
db.ph = NULL,
db.uid = NULL,
stacked = FALSE,
...
)
Arguments
db |
A highly structure db containing data from previously analised data. LLSR database is used by default but user may input his own db if formatted properly. |
db.CompA |
A String variable containing either the CAS, chemical formula or name of the upper phase enriched component.. |
db.CompB |
A String variable containing either the CAS, chemical formula or name of the lower phase component. |
db.CompC |
A String variable containing either the CAS, chemical formula or name of the additive component. |
db.Temp |
A numeric variable containing the Temperature (in Kelvin) to be searched within DB. |
db.ph |
A numeric variable containing the pH to be searched within DB. |
db.uid |
An Unique md5 hash Identification. User can retrieve data for a specific system if in possesion of its UID. |
stacked |
A boolean variable used to return value as a nested list or a data.frame. Used internally to organize data output. |
... |
Additional optional arguments. None are used at present. |
Details
The function return the systems that matches the criteria submitted by the user.
Value
Returns a data.frame containing system's parameters which match searched conditions
Examples
## Not run:
AQSearch.Parameter(db.CompA="Ammonium")
## End(Not run)
Search function for ATPS Systems data
Description
This function allow the user to search the package database to find any ATPS that matches the available criteria.
Usage
## S3 method for class 'Slope'
AQSearch(
db = LLSR::llsr_data,
db.CompA = NULL,
db.CompB = NULL,
db.CompC = NULL,
db.Temp = NULL,
db.ph = NULL,
db.uid = NULL,
stacked = FALSE,
...
)
Arguments
db |
A highly structure db containing data from previously analised data. LLSR database is used by default but user may input his own db if formatted properly. |
db.CompA |
A String variable containing either the CAS, chemical formula or name of the upper phase enriched component.. |
db.CompB |
A String variable containing either the CAS, chemical formula or name of the lower phase component. |
db.CompC |
A String variable containing either the CAS, chemical formula or name of the additive component. |
db.Temp |
A numeric variable containing the Temperature (in Kelvin) to be searched within DB. |
db.ph |
A numeric variable containing the pH to be searched within DB. |
db.uid |
An Unique md5 hash Identification. User can retrieve data for a specific system if in possesion of its UID. |
stacked |
A boolean variable used to return value as a nested list or a data.frame. Used internally to organize data output. |
... |
Additional optional arguments. None are used at present. |
Details
The function return the systems that matches the criteria submitted by the user.
Value
Returns a data.frame containing system's parameters which match searched conditions
Examples
## Not run:
AQSearch.Slope(db.CompA="Ammonium")
## End(Not run)
Search function for ATPS Systems data
Description
This function allow the user to search the package database to find any ATPS that matches the available criteria.
Usage
## S3 method for class 'Tieline'
AQSearch(
db = LLSR::llsr_data,
db.CompA = NULL,
db.CompB = NULL,
db.CompC = NULL,
db.Temp = NULL,
db.ph = NULL,
db.uid = NULL,
stacked = FALSE,
...
)
Arguments
db |
A highly structure db containing data from previously analyzed data. LLSR database is used by default but user may input his own db if formatted properly. |
db.CompA |
A String variable containing either the CAS, chemical formula or name of the upper phase enriched component.. |
db.CompB |
A String variable containing either the CAS, chemical formula or name of the lower phase component. |
db.CompC |
A String variable containing either the CAS, chemical formula or name of the additive component. |
db.Temp |
A numeric variable containing the Temperature (in Kelvin) to be searched within DB. |
db.ph |
A numeric variable containing the pH to be searched within DB. |
db.uid |
An Unique md5 hash Identification. User can retrieve data for a specific system if in possesion of its UID. |
stacked |
A boolean variable used to return value as a nested list or a data.frame. Used internally to organize data output. |
... |
Additional optional arguments. None are used at present. |
Details
The function return the systems that matches the criteria submitted by the user.
Value
Returns a data.frame containing system's parameters which match searched conditions
Examples
## Not run:
AQSearch.Tieline(db.CompA="Ammonium")
## End(Not run)
Merchuk's nonlinear Equation
Description
.
Perform a nonlinear regression fit using any of the several mathematical descriptors implemented in order to calculate the equation's parameters.
Usage
AQSys(dataSET, ...)
## Default S3 method:
AQSys(dataSET, modelName = "merchuk", Order = "xy", ...)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit |
... |
Additional optional arguments. None are used at present. |
modelName |
- Character String specifying the nonlinear empirical equation to fit data. The default method uses Merchuk's equation. Other mathematical descriptors can be listed using AQSysList(). |
Order |
Defines how the data is organized in the Worksheet. Use "xy" whether the first column corresponds to the lower phase fraction and "yx" whether the opposite. |
Details
The function returns functions parameters after fitting experimental data to the equations listed in AQSysList().
Value
A list containing three data.frame variables with all data parsed from the worksheet and parameters calculated through the available mathematical descriptions.
References
MURUGESAN, T.; PERUMALSAMY, M. Liquid-Liquid Equilibria of Poly(ethylene glycol) 2000 + Sodium Citrate + Water at (25, 30, 35, 40, and 45) C. Journal of Chemical & Engineering Data, v. 50, n. 4, p. 1392-1395, 2005/07/01 2005. ISSN 0021-9568. (doi: 10.1021/je050081k)
MERCHUK, J. C.; ANDREWS, B. A.; ASENJO, J. A. Aqueous two-phase systems for protein separation: Studies on phase inversion. Journal of Chromatography B: Biomedical Sciences and Applications, v. 711, n. 1-2, p. 285-293, 1998. ISSN 0378-4347. (doi: 10.1016/s0378-4347(97)00594-x)
TANG, X. et al. The study of phase behavior of aqueous two-phase system containing [Cnmim] BF 4 (n=2, 3, 4)+(NH4)2SO4 + H2O at different temperatures. Fluid Phase Equilibria, v. 383, p. 100-107, 2014. ISSN 0378-3812. (doi: 10.1016/j.fluid.2014.09.029)
GONZALEZ-TELLO, P. et al. Liquid-Liquid Equilibrium in the System Poly(ethylene glycol) + MgSO4 + H2O at 298 K. Journal of Chemical & Engineering Data, v. 41, n. 6, p. 1333-1336, 1996/01/01 1996. ISSN 0021-9568. (doi: 10.1021/je960075b)
CHEN, Y. et al. Liquid-liquid equilibria of aqueous biphasic systems composed of 1-butyl-3-methyl imidazolium tetrafluoroborate+ sucrose/maltose+ water. Journal of Chemical & Engineering Data, v. 55, n. 9, p. 3612-3616, 2010. ISSN 0021-9568. (doi: 10.1021/je100212p)
See Also
Examples
# Populating variable dataSET with binodal data
dataSET <- peg4kslt[ , 1:2]
# Fitting dataSET using Merchuk's function
AQSys(dataSET)
ATPS Critical Point Calculation
Description
This function implements methods available in current literature to calculate an ATPS critical point based on its experimental data.
Usage
## S3 method for class 'CritPoint'
AQSys(
dataSET,
tldata,
method,
modelName = "merchuk",
slope = NULL,
NP = 100,
xmax = 30,
xlbl = "",
ylbl = "",
Order = "xy",
ext = FALSE,
...
)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit. [type:data.frame] |
tldata |
- A data.frame with two columns containing a set of Tieline's Slopes (S) and its bottom-rich component composition in the bottom phase (XB). [type:data.frame] |
method |
- Binodal Experimental data that will be used in the nonlinear fit. [type:string] "algebraic" - Uses the critical point own definition to set up constraints and solve a system of equations. Still in development. "numerical" - A number of tie-lines are calculated successively until TLL is close to zero and concentration of components are numerically equal. A constant slope is assumed. "polynomial" - Calculate the intercept point between the chosen mathematical description and a third order polynomial fitting the tie-lines mid-points |
modelName |
- Mathematical descriptor that will be used for non-linear fitting. Use AQSysList() to list the available equations. [type:string] |
slope |
The method assumes all tielines for a given ATPS are parallel, thus only one slope is required. [type:double] |
NP |
Number of points used to build the fitted curve. Default is 100. [type:integer] |
xmax |
Maximum value for the Horizontal axis' value (bottom-rich component). [type:double] |
xlbl |
Plot's Horizontal axis label. [type:string] |
ylbl |
Plot's Vertical axis label. [type:string] |
Order |
Defines how the data is organized in the Worksheet. Use "xy" whether the first column corresponds to the lower phase fraction and "yx" whether the opposite. [type:string] |
ext |
- False: Return only XC and YC. True: return an extended output result, including phase diagram plot and an data.frame including the calculated data. [type:boolean] |
... |
Additional optional arguments. None are used at present. |
Details
The Critical Point is one in which both the composition and volume of the phases become equal, and the tie-line length (TLL) tends to zero. Thus, the methods here implemented the methods decribed by KAUL, A (2000) calculated a theoretical critical point.
Value
(XC,YC) - The function returns Tieline's Critical Point Composition
References
KAUL, A. The Phase Diagram. In: HATTI-KAUL, R. (Ed.). Aqueous Two-Phase Systems: Methods and Protocols: Humana Press, v.11, 2000. cap. 2, p.11-21. (Methods in Biotechnology). ISBN 978-0-89603-541-6. (doi: 10.1385/1-59259-028-4:11)
Examples
## Not run:
AQSys.CritPoint(dataSET, tldata)
## End(Not run)
Lever-Arm Rule - tie-line's Composition Calculation
Description
Merchuk et al. described a very straightforward method to calculate the concentration of each component in the tieline giving only its global composition and phase's properties (such as volume and density). Here this method is implemented and generalized for multiple mathematical descriptors.
Usage
## S3 method for class 'LevArmRule'
AQSys(
dataSET,
modelName = "merchuk",
Xm,
Ym,
Vt = NULL,
Vb = NULL,
dyt = NULL,
dyb = NULL,
WT = NULL,
WB = NULL,
byW = TRUE,
Order = "xy",
...
)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit |
modelName |
- Character String specifying the nonlinear empirical equation to fit data. The default method uses Merchuk's equation. Other mathematical descriptors can be listed using AQSysList(). |
Xm |
- Component X's concentration in the tieline's global composition. |
Ym |
- Component Y's concentration in the tieline's global composition. |
Vt |
- Tieline's TOP phase volume. |
Vb |
- Tieline's BOTTOM phase volume. |
dyt |
- Tieline's TOP phase density |
dyb |
- Tieline's BOTTOM phase density |
WT |
- ATPS upper phase weight |
WB |
- ATPS bottom phase weight |
byW |
- Use weight (TRUE) or volume and density (FALSE) during lever arm rule calculation. |
Order |
Defines how the data is organized in the Worksheet. Use "xy" whether the first column corresponds to the lower phase fraction and "yx" whether the opposite. |
... |
Additional optional arguments. None are used at present. |
Details
Using any implemented binodal data mathematical descriptor, the global composition of a chosen tieline and its phases properties.
Value
The function returns the Critical Point (X,Y), Tieline Length (TLL), Tieline's Equivolume point (xVRe2o,yVRe2o), and Tieline's Slope.
References
MERCHUK, J. C.; ANDREWS, B. A.; ASENJO, J. A. Aqueous two-phase systems for protein separation: Studies on phase inversion. Journal of Chromatography B: Biomedical Sciences and Applications, v. 711, n. 1-2, p. 285-293, 1998. ISSN 0378-4347. (ScienceDIrect)
Examples
## Not run:
AQSys.LevArmRule(dataSET, Xm, Ym, Vt, Vb, dyt, dyb, WT, WB, byW = FALSE)
## End(Not run)
Dataset and Fitted Function plot
Description
The function returns a plot after fitting a dataset to the mathematical descriptor chosen by the user.
Usage
## S3 method for class 'data'
AQSys(dataSET, modelName = "merchuk", Order = "xy", xmax = "", ymax = "", ...)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit. It might hold multiple systems stacked side-by-side. [type:data.frame] |
modelName |
- Character String specifying the nonlinear empirical equation to fit data. [type:String] The default method uses Merchuk's equation. Other mathematical descriptors can be listed using AQSysList(). |
Order |
Defines how the data is organized in the Worksheet. Use "xy" whether the first column corresponds to the lower phase fraction and "yx" whether the opposite. [type:String] |
xmax |
Maximum value for the Horizontal axis' value - optional [type:double] |
ymax |
Maximum value for the Vertical axis' value - optional [type:double] |
... |
Additional optional arguments. None are used at present. |
Details
This version uses the plot function and return a regular orthogonal plot.
Value
return a data.frame with data fitted using the chosen mathematical descriptor.
Examples
# Populating variable dataSET with binodal data
dataSET <- peg4kslt[ , 1:2]
# Fitting dataSET using Merchuk's function
data <- AQSys.data(dataSET, Order = "xy")
Dataset and Fitted Function plot
Description
The function returns a plot after fitting a dataset to the mathematical descriptor chosen by the user.
Usage
## S3 method for class 'plot'
AQSys(
dataSET,
xlbl = "",
ylbl = "",
main = NULL,
col = "blue",
type = "p",
cex = 1,
cexlab = 1,
cexaxis = 1,
cexmain = 1,
cexsub = 1,
modelName = "merchuk",
NP = 100,
xmax = "",
ymax = "",
Order = "xy",
save = FALSE,
HR = FALSE,
filename = NULL,
wdir = NULL,
silent = FALSE,
...
)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit. It might hold multiple systems stacked side-by-side. [type:data.frame] |
xlbl |
Plot's Horizontal axis label. |
ylbl |
Plot's Vertical axis label. |
main |
Legacy from plot package. For more details,
see |
col |
Legacy from plot package. For more details,
see |
type |
Legacy from plot package. For more details,
see |
cex |
Legacy from plot package. For more details,
see |
cexlab |
Legacy from plot package. For more details,
see |
cexaxis |
Legacy from plot package. For more details,
see |
cexmain |
Legacy from plot package. For more details,
see |
cexsub |
Legacy from plot package. For more details,
see |
modelName |
- Character String specifying the nonlinear empirical equation to fit data. The default method uses Merchuk's equation. Other possibilities can be seen in AQSysList(). |
NP |
Number of points used to build the fitted curve. Default is 100. [type:Integer] |
xmax |
Maximum value for the Horizontal axis' value |
ymax |
Maximum value for the Vertical axis' value |
Order |
Defines how the data is organized in the Worksheet. Use "xy" whether the first column corresponds to the lower phase fraction and "yx" whether the opposite. |
save |
Save the generated plot in the disk using path and filename provided by the user. [type:Boulean] |
HR |
Adjust Plot's text to be compatible with High Resolution size [type:Boulean] |
filename |
Filename provided by the user to save a given plot. [type:String] |
wdir |
The directory in which the plot file will be saved. [type:String] |
silent |
save plot file without actually showing it to the user. [type:Boulean] |
... |
Additional optional arguments. None are used at present. |
Details
This version uses the plot function and return a regular orthogonal plot.
Value
A plot containing the experimental data, the correspondent curve for the binodal in study and the curve's raw XY data.
Examples
#Populating variable dataSET with binodal data
dataSET <- peg4kslt[, 1:2]
# Plot dataSET using Merchuk's function
#
AQSys.plot(dataSET)
#
Bancroft's Potential Equation - tie-line's correlation
Description
Bancroft's equation to correlate tie-line's data.
Usage
AQSysBancroft(dataSET, ...)
Arguments
dataSET |
- Tieline Experimental data that will be used in the nonlinear fit |
... |
Additional optional arguments. None are used at present. |
Value
Parameters k1, r and Statistical data
References
TUBIO, G. et al. Liquid-liquid equilibrium of the Ucon 50-HB5100/sodium citrate aqueous two-phase systems. Separation and Purification Technology, v. 65, n. 1, p. 3-8, 2009. ISSN 1383-5866. (ScienceDirect)
Examples
# dataSET is a data.frame which contains series of Tieline's mass fraction
# (upper-rich component, bottom-rich component and water)
# Each column in the data.frame represents a series of one component mass
# fraction
# For example, an empty data.frame for four tielines can be obtaining using:
dataSET <- matrix(NA, nrow = 4, ncol = 6)
# Variables order must follows the sequence presented below:
# "mfXt","mfYt","mfXb","mfYb","mfWt","mfWb"
# In which: mf stands for mass fraction; X and Y for the component
# rich in bottom and upper phase, respectively; t or b for top and
# bottom phases and W for water.
# Then you just need to load the data.frame in the function:
## Not run:
AQSysBancroft(dataSET, Order = "xy")
## End(Not run)
This functions plot a curve based in the chosen model and its parameters.
Description
The function returns a plot after using the parameters and model given by the user.
Usage
AQSysCurve(
modelName,
modelPars,
seriesNames = NULL,
xlbl = "",
ylbl = "",
col = "black",
type = "p",
cex = 1,
cexlab = 1,
cexaxis = 1,
cexmain = 1,
cexsub = 1,
xmax = 35,
HR = FALSE,
NP = 100,
filename = NULL,
wdir = NULL,
save = FALSE,
silent = FALSE,
...
)
Arguments
modelName |
Equation to be used: merchuk, murugesan [type:string] |
modelPars |
Model's parameters [type::data.frame] |
seriesNames |
A list of sequential names which will identify each system provided by the user in the dataSET variable. [type:List] |
xlbl |
Plot's Horizontal axis label. |
ylbl |
Plot's Vertical axis label. |
col |
Legacy from plot package. For more details,
see |
type |
1-character string giving the type of plot desired. The
following values are possible, for details, see |
cex |
Legacy from plot package. For more details,
see |
cexlab |
Legacy from plot package. For more details,
see |
cexaxis |
Legacy from plot package. For more details,
see |
cexmain |
Legacy from plot package. For more details,
see |
cexsub |
Legacy from plot package. For more details,
see |
xmax |
Maximum value for the Horizontal axis' value (bottom-rich component) [type:double] |
HR |
Adjust Plot's text to be compatible with High Resolution size [type:Logical] |
NP |
Number of points used to build the fitted curve. Default is 100. [type:Integer] |
filename |
Filename provided by the user to save a given plot. [type:String] |
wdir |
The directory in which the plot file will be saved. [type:String] |
save |
Save the generated plot in the disk using path and filename provided by the user. [type:Logical] |
silent |
save plot file without actually showing it to the user. [type:Logical] |
... |
other graphical parameters (see |
Details
The function owns predefined set of equations that can be seen below and must be used, with adequated parameters, to return a plot which represent the chosen model.
Value
A plot using the input model within the chosen interval and the curve's raw XY data. If no interval is selected, xmax = 0.4.
Examples
## Not run:
AQSysCurve("murugesan", data.frame(90.389, -34.897, 2.924), col = "red")
## End(Not run)
AQSysDB
Description
Import DB data from an Excel Worksheet and process it through mathematical descriptors to output a highly structured variable comparable to a Database and which hold a list of references, chemicals and parameters for any implemented mathematical descriptors.
Usage
AQSysDB(path)
Arguments
path |
String containing the full path to the XLS or XLSX file. |
Examples
## Not run:
AQSysDB("C:/data.xlsx")
## End(Not run)
AQSysDOE
Description
The function uses a ATPS characterization data to build a Design
Of Experiments (DOE) matrix based on
Tie-Line Length (TLL) and Volume Ratio.
see AQSysEval
for more details.
Usage
AQSysDOE(
dataSET,
db = LLSR::llsr_data,
slope = NULL,
xmax = 100,
modelName = "merchuk",
nTL = 3,
nPoints = 3,
tol = 1e-05
)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit. |
db |
A highly structure db containing data from previously analyzed data. LLSR database is used by default but user may input his own db if formatted properly. |
slope |
The method assumes all tielines for a given ATPS are parallel, thus only one slope is required. [type:double] |
xmax |
Maximum value for the Horizontal axis' value (bottom-rich component). [type:double] |
modelName |
Character String specifying the nonlinear empirical equation to fit data. The default method uses Merchuk's equation. Other mathematical descriptors can be listed using AQSysList(). [type:string] |
nTL |
Number of tielines plotted for a given ATPS. Default is 3. [type:Integer] |
nPoints |
Number of points chosen for a given tieline. Default is 3. [type:Integer] |
tol |
limit of tolerance to reach to assume convergence. Default is 1e-5. [type:Integer] |
Examples
# dataSET is a data.frame which contains series of Tieline's mass fraction
# and information
# from both components and #' # extraction conditions (T, pH). The function
# perform a system
# characterizaion based on data stored in LLSR's database
# (or provided by the user)
# and then calculate a DOE based on the input.
## Not run:
dataSET <- AQSearch.Binodal(db.uid='56b53a50f500c502fa4a65d197fc6d84')
ans <- AQSysDOE(dataSET2, nTL = 5, nPoints = 5)
View(ans$DOE)
## End(Not run)
AQSysEval
Description
The function perform a full ATPS characterization (parameters, tie-line boundaries and critical point), generating a brief report.
Usage
AQSysEval(
dataSET,
db = LLSR::llsr_data,
xmax = NULL,
ymax = NULL,
NP = 100,
slope = NULL,
modelName = "merchuk",
convrgnceLines = FALSE,
nTL = 3,
nPoints = 3,
tol = 1e-04,
xlbl = "",
ylbl = "",
seriesNames = NULL,
save = FALSE,
HR = FALSE,
autoname = FALSE,
wdir = NULL,
silent = TRUE
)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit. [type:data.frame] |
db |
A highly structure db containing data from previously analyzed data. LLSR database is used by default but user may input his own db if formatted properly. |
xmax |
Maximum value for the Horizontal axis' value (bottom-rich component). [type:double] |
ymax |
Maximum value for the vertical axis' value (bottom-rich component). [type:double] |
NP |
Number of points used to build the fitted curve. Default is 100. [type:Integer] |
slope |
The method assumes all tielines for a given ATPS are parallel, thus only one slope is required. [type:double] |
modelName |
Character String specifying the nonlinear empirical equation to fit data. The default method uses Merchuk's equation. Other mathematical descriptors can be listed using AQSysList(). [type:string] |
convrgnceLines |
Magnify Plot's text to be compatible with High Resolution size [type:Logical] |
nTL |
Number of tielines plotted for a given ATPS. Default is 3. [type:Integer] |
nPoints |
Number of points chosen for a given tieline. Default is 3. [type:Integer] |
tol |
limit of tolerance to reach to assume convergence. Default is 1e-5. [type:Integer] |
xlbl |
Plot's Horizontal axis label. [type:String] |
ylbl |
Plot's Vertical axis label. [type:String] |
seriesNames |
Number of points used to build the fitted curve. Default is 100. [type:Integer] |
save |
Save the generated plot in the disk using path and filename provided by the user. Default is FALSE. [type:Logical] |
HR |
Magnify Plot's text to be compatible with High Resolution size [type:Logical] |
autoname |
Number of points used to build the fitted curve. Default is FALSE. [type:Logical] |
wdir |
The directory in which the plot file will be saved. [type:String] |
silent |
save plot file without actually showing it to the user. Default is FALSE. [type:Logical] |
References
KAUL, A. The Phase Diagram. In: HATTI-KAUL, R. (Ed.). Aqueous Two-Phase Systems: Methods and Protocols: Humana Press, v.11, 2000. cap. 2, p.11-21. (Methods in Biotechnology). ISBN 978-0-89603-541-6. (SpringerLink)
Examples
## Not run:
dataSET <- AQSearch.Binodal(db.uid='56b53a50f500c502fa4a65d197fc6d84')
xLabel <- "Ammonium Sulphate"
yLabel <- "Poly(ethylene glycol) 2000"
EvalData <- AQSysEval(dataSET2 , xlbl = xLabel, ylbl = yLabel)
## End(Not run)
Aqueous Systems Descriptors already implemented
Description
The function returns a list of all mathematical descriptors available at the time.
Usage
AQSysList(npars = FALSE)
Arguments
npars |
Logic option to return a List variable containing the number of required parameters for each equation. |
Othmer's Equation - Tieline's correlation
Description
Othmer's equation to correlate tieline's data applying the lever's rule.
Usage
AQSysOthmer(dataSET, ...)
Arguments
dataSET |
- Tieline Experimental data that will be used in the nonlinear fit |
... |
Additional optional arguments. None are used at present. |
Value
Parameters A, B and Statistical data
References
OTHMER, D.; TOBIAS, P. Liquid-Liquid Extraction Data - The Line Correlation. Industrial & Engineering Chemistry, v. 34, n. 6, p. 693-696, 1942/06/01 1942. ISSN 0019-7866. (ACS Publications)
Examples
# dataSET is a data.frame which contains series of Tieline's mass fraction
# (upper-rich component, bottom-rich component and water)
# Each column in the data.frame represents a series of one component mass
# fraction
# For example, an empty data.frame for four tielines can be obtaining using:
dataSET<-matrix(NA,nrow=4,ncol=6)
# Variables order must follows the sequence presented below:
# "mfXt","mfYt","mfXb","mfYb","mfWt","mfWb"
# In which: mf stands for mass fraction; X and Y for the component
# rich in bottom and upper phase, respectively; t or b for top and
# bottom phases.
# Then you just need to load the data.frame in the function:
## Not run:
AQSysOthmer(dataSET, Order = "xy")
## End(Not run)
AQSysPlot
Description
This functions plot binodal data as a curve in a pre-defined high quality theme ready for publication.
Usage
AQSysPlot(
dataSET,
Order = "xy",
xlbl = "",
ylbl = "",
seriesNames = NULL,
save = FALSE,
filename = NULL,
HR = FALSE,
wdir = NULL,
silent = FALSE
)
Arguments
dataSET |
- Binodal Experimental data that will be used in the nonlinear fit. It might hold multiple systems stacked side-by-side. [type:data.frame] |
Order |
Defines how the data is organized in the Worksheet. Use "xy" whether the first column corresponds to the lower phase fraction and "yx" whether the opposite. [type:string] |
xlbl |
Plot's Horizontal axis label. |
ylbl |
Plot's Vertical axis label. |
seriesNames |
A list of sequential names which will identify each system provided by the user in the dataSET variable. [type:List] |
save |
Save the generated plot in the disk using path and filename provided by the user. Default is False. [type:Logical] |
filename |
A filename provided by the user to save a given plot. No default is provided. [type:String] |
HR |
Adjust Plot's text to be compatible with High Resolution size [type:Logical] |
wdir |
The directory in which the plot file will be saved. [type:String] |
silent |
save plot file without actually showing it to the user. Default is FALSE. [type:Logical] |
Details
The function have a predefined set of ggplot2 features adjusted to return a high quality picture. More suitable for plotting fitted data, once binodal data usually determined through cloudy-phase point will look irregular.
Value
The plot is returned as a ggplot2 object that can be manipulated accordingly.
Examples
# Populating variable dataSET with binodal data
dataSET <- peg4kslt[ , 1:2]
# Fitting dataSET using Merchuk's function
data <- AQSys.data(dataSET, Order = "xy")
AQSysPlot(data)
LLSR Data Exporter
Description
The function saves a copy of a specified variable to a file in the folder pointed by the user.
Usage
export_data(localData = NULL)
Arguments
localData |
A variable existing in R environment and that will be saved locally. |
LLSR Template Exporter
Description
The function makes a copy of LLSR's template file and copy it to the folder pointed by the user.
Usage
export_template()
LLSR's database
Description
A database is a highly structured collection of data generally stored and accessed from a computer system and stores raw data and parameters for all analised ATPS phase diagrams.
Format
multi-level data.frame()
- db.ref
Table from LLSR's database in which the references for all used manuscripts are stored.
- db.sys
Table from LLSR's database in which parameters for all implemented mathematical descriptors are stored. Statistic data is also available.
- db.cas
Table from LLSR's database in which information regarded all chemicals (such as name and CAS number) used in the collected data.
- db.data
Table from LLSR's database in which raw experimental data is tabulated. The data was used to calculate all properties made available in this package.
- db.tielines
Table from LLSR's database in which raw experimental data, used to calculate tielines compositions and slopes, are stored.
...
Source
https://github.com/diegofcoelho/LLSR/
Examples
#
XYdt <- llsr_data[["db.data"]][, 1:2]
Xdt <- llsr_data[["db.data"]][, 1]
Ydt <- llsr_data[["db.data"]][, 2]
Dataset of experimental binodal data of an ATPS
Description
A dataset containing the experimental binodal data for a PEG/SALT Aqueous Two-Phases System (ATPS)
Format
multi-level data.frame()
- XC
Ammonium Sulphate mass fraction
- YC
Poly(ethylene glycol) mass fraction
...
Examples
#
XYdt <- peg4kslt[,1:2]
#
Xdt<-peg4kslt[,1]
#
Ydt<-peg4kslt[,1]