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 SpringConstant and the curvename, being the former the cantilever spring constant and the latter a F-d curve ID. Function afmReadJPK will try to obtain the spring constant from the file header and the curvename from the data file name.

Value

An object of class afmdata

See Also

afmexperiment

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)

[Package afmToolkit version 0.0.1 Index]