When we use the function cvSim
to create an object it returns to the object a list that contains the following vectors and matrices
time
: a vector that contains the discrete times used to define the diffusion griddistance
: a vector that contains the discrete distances used to define the diffusion gridpotential
: a vector that contains the discrete applied potentials corresponding to the discrete times used in the simulationcurrent
: a vector that contains the calculated current at each discrete applied potentialoxdata
: a matrix that contains the concentrations of the oxidized species in the diffusion grid; each row in the matrix is a discrete time and each column in the matrix is a discrete distancereddata
: a matrix that contains red concentrations of the reduced species in diffusion grid; each row in the matrix is a discrete time and each column in the matrix is a discrete distanceformalE
: the redox couple’s formal potentialWe can access this data to examine the times, potentials, and currents generated by a simulation. All the functions described here are included in the file cvFunctions.R
.
A table is a convenient way to examine the relationship between several variables. To create a table, we first use the tableCV
function
tableCV(file)
which takes as its only input the name of the object created by cvSim
; thus
tableCV(testCV)
The resulting table displays the data across several pages, showing, by default, 10 rows per page. Clicking on the name of a column allows you to reorder the data by its rank.
Although we can use the table created by the displayTable
function to find the maximum peak currents and peak potentials, it is easier to use the summaryCV
function
summaryCV(file)
which takes as its only input the name of the object created by cvSim
; thus
summaryCV(testCV)
## $note
## [1] "imax: maximum current in A" "imin: minimum current in A"
## [3] "epc: cathodic peak potential in V" "epa: anodic peak potential in V"
##
## $imax
## [1] 3.58e-07
##
## $imin
## [1] -2.55e-07
##
## $epc
## [1] -0.025
##
## $epa
## [1] 0.05
Note: Although imax corresponds to ip,c, imin does not correspond to ip,a as it does not correct for the background current.