Title: | Data Analysis of Liquid-Liquid Systems using R |
---|---|
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. |
Authors: | Diego F Coelho <[email protected]> [aut, cre], Pedro Vitor Oliveira Menezes <[email protected]> [dtc], Carla Corina dos Santos Porto <[email protected]> [dtc], Jon George Huddleston <[email protected]> [rev], Elias Basile Tambourgi <[email protected]> [rev] |
Maintainer: | Diego F Coelho <[email protected]> |
License: | GPL-3 |
Version: | 0.0.3.1 |
Built: | 2024-11-16 03:04:02 UTC |
Source: | https://github.com/diegofcoelho/llsr |
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.
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, ... )
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, ... )
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. |
The function return the systems that matches the criteria submitted by the user.
Returns a data.frame containing system's parameters which match searched conditions
## Not run: AQSearch(db.CompA="Ammonium") ## End(Not run)
## Not run: AQSearch(db.CompA="Ammonium") ## End(Not run)
This function allow the user to search the package database to find any ATPS that matches the available criteria.
## 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, ... )
## 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, ... )
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. |
The function return the systems that matches the criteria submitted by the user.
Returns a data.frame containing system's parameters which match searched conditions
## Not run: AQSearch.Binodal(db.CompA="Ammonium") ## End(Not run)
## Not run: AQSearch.Binodal(db.CompA="Ammonium") ## End(Not run)
This function allow the user to search the package database to find any ATPS that matches the available criteria.
## 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, ... )
## 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, ... )
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. |
The function return the systems that matches the criteria submitted by the user.
Returns a data.frame containing system's parameters which match searched conditions
## Not run: AQSearch.Parameter(db.CompA="Ammonium") ## End(Not run)
## Not run: AQSearch.Parameter(db.CompA="Ammonium") ## End(Not run)
This function allow the user to search the package database to find any ATPS that matches the available criteria.
## 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, ... )
## 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, ... )
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. |
The function return the systems that matches the criteria submitted by the user.
Returns a data.frame containing system's parameters which match searched conditions
## Not run: AQSearch.Slope(db.CompA="Ammonium") ## End(Not run)
## Not run: AQSearch.Slope(db.CompA="Ammonium") ## End(Not run)
This function allow the user to search the package database to find any ATPS that matches the available criteria.
## 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, ... )
## 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, ... )
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. |
The function return the systems that matches the criteria submitted by the user.
Returns a data.frame containing system's parameters which match searched conditions
## Not run: AQSearch.Tieline(db.CompA="Ammonium") ## End(Not run)
## Not run: AQSearch.Tieline(db.CompA="Ammonium") ## End(Not run)
.
Perform a nonlinear regression fit using any of the several mathematical descriptors implemented in order to calculate the equation's parameters.
AQSys(dataSET, ...) ## Default S3 method: AQSys(dataSET, modelName = "merchuk", Order = "xy", ...)
AQSys(dataSET, ...) ## Default S3 method: AQSys(dataSET, modelName = "merchuk", Order = "xy", ...)
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. |
The function returns functions parameters after fitting experimental data to the equations listed in AQSysList().
A list containing three data.frame variables with all data parsed from the worksheet and parameters calculated through the available mathematical descriptions.
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)
# Populating variable dataSET with binodal data dataSET <- peg4kslt[ , 1:2] # Fitting dataSET using Merchuk's function AQSys(dataSET)
# Populating variable dataSET with binodal data dataSET <- peg4kslt[ , 1:2] # Fitting dataSET using Merchuk's function AQSys(dataSET)
This function implements methods available in current literature to calculate an ATPS critical point based on its experimental data.
## S3 method for class 'CritPoint' AQSys( dataSET, tldata, method, modelName = "merchuk", slope = NULL, NP = 100, xmax = 30, xlbl = "", ylbl = "", Order = "xy", ext = FALSE, ... )
## S3 method for class 'CritPoint' AQSys( dataSET, tldata, method, modelName = "merchuk", slope = NULL, NP = 100, xmax = 30, xlbl = "", ylbl = "", Order = "xy", ext = FALSE, ... )
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. |
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.
(XC,YC) - The function returns Tieline's Critical Point Composition
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)
## Not run: AQSys.CritPoint(dataSET, tldata) ## End(Not run)
## Not run: AQSys.CritPoint(dataSET, tldata) ## End(Not run)
The function returns a plot after fitting a dataset to the mathematical descriptor chosen by the user.
## S3 method for class 'data' AQSys(dataSET, modelName = "merchuk", Order = "xy", xmax = "", ymax = "", ...)
## S3 method for class 'data' AQSys(dataSET, modelName = "merchuk", Order = "xy", xmax = "", ymax = "", ...)
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. |
This version uses the plot function and return a regular orthogonal plot.
return a data.frame with data fitted using the chosen mathematical descriptor.
# Populating variable dataSET with binodal data dataSET <- peg4kslt[ , 1:2] # Fitting dataSET using Merchuk's function data <- AQSys.data(dataSET, Order = "xy")
# Populating variable dataSET with binodal data dataSET <- peg4kslt[ , 1:2] # Fitting dataSET using Merchuk's function data <- AQSys.data(dataSET, Order = "xy")
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.
## 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", ... )
## 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", ... )
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. |
Using any implemented binodal data mathematical descriptor, the global composition of a chosen tieline and its phases properties.
The function returns the Critical Point (X,Y), Tieline Length (TLL), Tieline's Equivolume point (xVRe2o,yVRe2o), and Tieline's Slope.
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)
## Not run: AQSys.LevArmRule(dataSET, Xm, Ym, Vt, Vb, dyt, dyb, WT, WB, byW = FALSE) ## End(Not run)
## Not run: AQSys.LevArmRule(dataSET, Xm, Ym, Vt, Vb, dyt, dyb, WT, WB, byW = FALSE) ## End(Not run)
The function returns a plot after fitting a dataset to the mathematical descriptor chosen by the user.
## 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, ... )
## 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, ... )
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. |
This version uses the plot function and return a regular orthogonal plot.
A plot containing the experimental data, the correspondent curve for the binodal in study and the curve's raw XY data.
#Populating variable dataSET with binodal data dataSET <- peg4kslt[, 1:2] # Plot dataSET using Merchuk's function # AQSys.plot(dataSET) #
#Populating variable dataSET with binodal data dataSET <- peg4kslt[, 1:2] # Plot dataSET using Merchuk's function # AQSys.plot(dataSET) #
Bancroft's equation to correlate tie-line's data.
AQSysBancroft(dataSET, ...)
AQSysBancroft(dataSET, ...)
dataSET |
- Tieline Experimental data that will be used in the nonlinear fit |
... |
Additional optional arguments. None are used at present. |
Parameters k1, r and Statistical data
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)
# 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)
# 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)
The function returns a plot after using the parameters and model given by the user.
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, ... )
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, ... )
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 |
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.
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.
## Not run: AQSysCurve("murugesan", data.frame(90.389, -34.897, 2.924), col = "red") ## End(Not run)
## Not run: AQSysCurve("murugesan", data.frame(90.389, -34.897, 2.924), col = "red") ## End(Not run)
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.
AQSysDB(path)
AQSysDB(path)
path |
String containing the full path to the XLS or XLSX file. |
## Not run: AQSysDB("C:/data.xlsx") ## End(Not run)
## Not run: AQSysDB("C:/data.xlsx") ## End(Not run)
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.
AQSysDOE( dataSET, db = LLSR::llsr_data, slope = NULL, xmax = 100, modelName = "merchuk", nTL = 3, nPoints = 3, tol = 1e-05 )
AQSysDOE( dataSET, db = LLSR::llsr_data, slope = NULL, xmax = 100, modelName = "merchuk", nTL = 3, nPoints = 3, tol = 1e-05 )
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] |
# 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)
# 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)
The function perform a full ATPS characterization (parameters, tie-line boundaries and critical point), generating a brief report.
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 )
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 )
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] |
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)
## 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)
## 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)
The function returns a list of all mathematical descriptors available at the time.
AQSysList(npars = FALSE)
AQSysList(npars = FALSE)
npars |
Logic option to return a List variable containing the number of required parameters for each equation. |
Othmer's equation to correlate tieline's data applying the lever's rule.
AQSysOthmer(dataSET, ...)
AQSysOthmer(dataSET, ...)
dataSET |
- Tieline Experimental data that will be used in the nonlinear fit |
... |
Additional optional arguments. None are used at present. |
Parameters A, B and Statistical data
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)
# 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)
# 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)
This functions plot binodal data as a curve in a pre-defined high quality theme ready for publication.
AQSysPlot( dataSET, Order = "xy", xlbl = "", ylbl = "", seriesNames = NULL, save = FALSE, filename = NULL, HR = FALSE, wdir = NULL, silent = FALSE )
AQSysPlot( dataSET, Order = "xy", xlbl = "", ylbl = "", seriesNames = NULL, save = FALSE, filename = NULL, HR = FALSE, wdir = NULL, silent = FALSE )
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] |
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.
The plot is returned as a ggplot2 object that can be manipulated accordingly.
# Populating variable dataSET with binodal data dataSET <- peg4kslt[ , 1:2] # Fitting dataSET using Merchuk's function data <- AQSys.data(dataSET, Order = "xy") AQSysPlot(data)
# Populating variable dataSET with binodal data dataSET <- peg4kslt[ , 1:2] # Fitting dataSET using Merchuk's function data <- AQSys.data(dataSET, Order = "xy") AQSysPlot(data)
The function saves a copy of a specified variable to a file in the folder pointed by the user.
export_data(localData = NULL)
export_data(localData = NULL)
localData |
A variable existing in R environment and that will be saved locally. |
The function makes a copy of LLSR's template file and copy it to the folder pointed by the user.
export_template()
export_template()
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.
multi-level data.frame()
Table from LLSR's database in which the references for all used manuscripts are stored.
Table from LLSR's database in which parameters for all implemented mathematical descriptors are stored. Statistic data is also available.
Table from LLSR's database in which information regarded all chemicals (such as name and CAS number) used in the collected 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.
Table from LLSR's database in which raw experimental data, used to calculate tielines compositions and slopes, are stored.
...
https://github.com/diegofcoelho/LLSR/
# XYdt <- llsr_data[["db.data"]][, 1:2] Xdt <- llsr_data[["db.data"]][, 1] Ydt <- llsr_data[["db.data"]][, 2]
# XYdt <- llsr_data[["db.data"]][, 1:2] Xdt <- llsr_data[["db.data"]][, 1] Ydt <- llsr_data[["db.data"]][, 2]
A dataset containing the experimental binodal data for a PEG/SALT Aqueous Two-Phases System (ATPS)
multi-level data.frame()
Ammonium Sulphate mass fraction
Poly(ethylene glycol) mass fraction
...
# XYdt <- peg4kslt[,1:2] # Xdt<-peg4kslt[,1] # Ydt<-peg4kslt[,1]
# XYdt <- peg4kslt[,1:2] # Xdt<-peg4kslt[,1] # Ydt<-peg4kslt[,1]