Title: | Dissipation Kinetics Analysis, Half Life Period, Rate Constant, Plots |
---|---|
Description: | For environmental chemists, ecologists, researchers and agricultural scientists to understand the dissipation kinetics, calculate the half-life periods and rate constants of compounds, pesticides, contaminants in different matrices. |
Authors: | Jajati Mandal [cre], Sandiapan Samanta [aut], Santanu Majumder [aut] |
Maintainer: | Jajati Mandal <[email protected]> |
License: | GPL |
Version: | 0.1.0 |
Built: | 2024-12-08 06:47:49 UTC |
Source: | CRAN |
This function calculates the rate constant, half-life, and provides a summary of the first-order dissipation kinetics of pesticides, including the intercept, R^2 value, and statistical measures of the fitted model.
first_order_kinetics(t, c)
first_order_kinetics(t, c)
t |
Numeric vector, time points. |
c |
Numeric vector, concentrations corresponding to each time point. |
The function performs a logarithmic transformation on the concentration values to fit a linear model which corresponds to the first-order kinetics equation. A negative of the slope of this model gives the rate constant, and the half-life is calculated using the natural logarithm of 2 divided by the rate constant.
A list containing the following components:
rate constant |
The calculated rate constant for the first-order kinetics. |
half life |
The calculated half-life based on the rate constant. |
summary |
A summary object providing statistical measures of the fitted model, including the intercept, R^2 value, among others. |
lm
, for details on the linear models used within.
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) first_order_kinetics(t, c)
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) first_order_kinetics(t, c)
This function plots the actual and predicted concentrations based on first-order kinetics.
plot_first_order_kinetics(t, c, kinetic_model)
plot_first_order_kinetics(t, c, kinetic_model)
t |
Numeric vector of time points. |
c |
Numeric vector of concentrations corresponding to each time point. |
kinetic_model |
Model object, result of lm function fitting log(c) ~ t. |
This function generates a plot of the actual vs. predicted concentrations based on the provided kinetic model and data points. The plot is rendered directly to the active plotting device.
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) model <- lm(log(c) ~ t) plot_first_order_kinetics(t, c, model)
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) model <- lm(log(c) ~ t) plot_first_order_kinetics(t, c, model)
This function plots the actual and transformed (1/c) concentrations based on second-order kinetics.
plot_second_order_kinetics(t, c, kinetic_model)
plot_second_order_kinetics(t, c, kinetic_model)
t |
Numeric vector, time points. |
c |
Numeric vector, concentrations corresponding to each time point. |
kinetic_model |
Model object, result of lm function fitting 1/c ~ t. |
This function generates a plot of the actual vs. predicted concentrations based on the provided kinetic model and data points. The plot is rendered directly to the active plotting device.
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) model <- lm(1/c ~ t) plot_second_order_kinetics(t, c, model)
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) model <- lm(1/c ~ t) plot_second_order_kinetics(t, c, model)
This function calculates the rate constant and half-life based on second-order dissipation kinetics of pesticides, and provides a summary of the kinetic model including intercept, R-squared value, and other statistical measures.
second_order_kinetics(t, c)
second_order_kinetics(t, c)
t |
Numeric vector, time points. |
c |
Numeric vector, concentrations corresponding to each time point. |
The function first checks if the concentration values are greater than zero and if the length of the time and concentration vectors are equal. It then transforms the concentration data for second-order kinetics analysis and fits a linear model to the transformed data. From the fitted model, it calculates the rate constant and the half-life of the reaction. Finally, it provides a summary of the kinetic model, including the intercept, R-squared value, and other statistical measures.
A list containing the following components:
rate constant |
The calculated rate constant for the first-order kinetics. |
half life |
The calculated half-life based on the rate constant and initial concentration. |
summary |
A summary object providing statistical measures of the fitted model, including the intercept, R^2 value, among others. |
lm
, for details on the linear models used within.
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) second_order_kinetics(t, c)
t <- c(0, 5, 10, 15, 20, 25) c <- c(100, 80, 60, 40, 20, 10) second_order_kinetics(t, c)