afmdata {afmToolkit} | R Documentation |
AFM data
Description
This function creates an afmdata
structure, which is as list with at
least one field called data
which is a data frame with a valid AFM data, that is,
at least 3 variables called "Z", "Force", and "Segment".
Usage
afmdata(data, dstr = "Z", Fstr = "Force", Segstr = "Segment", tstr = "Time",
params = list(SpringConstant = numeric(), curvename = NULL ))
Arguments
data |
A data frame consisting in 3 or 4 columns. A minimum of "Z" (or "distance"), "Force" and "Segment". Optionally a fourth column with "Time" could be added. |
dstr |
Character string with the posible names for the distance variable. |
Fstr |
Character string with the posible names for the force variable. |
Segstr |
Character string with the posible names for the Segment variable. |
tstr |
Character string with the posible names for the time variable. |
params |
A list that may contain parameters describing the F-d curve. At least will
contain the |
Value
An object of class afmdata
See Also
Examples
#Making some artifical data following a L-J 12-6 potential
n <- 1000
z <- seq(from = 9e-3, to = 1e-1, length.out = n )
u0 <- 1e-5
z0 <- 1e-2
Force <- -u0*(12*z0^6/z^7-12*z0^12/z^13)
Segment <- rep("approach",n)
AFMcurve <- afmdata(data.frame(Z = z, Force = Force, Segment = Segment))
plot(AFMcurve)