afmZeroPointSlope: Zero Force Point and Slope

Description Usage Arguments Value Examples

View source: R/afmZeroPointSlope.R

Description

This function finds the point of zero force (real contact point) and the slope of the contact part of the Force-Distance curve.

Usage

1
afmZeroPointSlope(afmdata, fstar = 0, segment = c("approach", "retract"))

Arguments

afmdata

An afmdata object. It should be a valid afmdata object upon which the Contact Point and the baseline correction must have been calculated first (using functions afmContactPoint() and afmBaselineCorrection())

fstar

Value such that fstar * sd is to be considered as zero Force, where sd is the standard deviation of Force at the basline. It takes fstar = 0 as default value, meaning that zero force is actually zero.

segment

The segment on which everything is calculated.

Value

An afmdata class variable which will consist on the original input afmdata variable plus a new list named Slopes with the following fields: Z0Point: Point of zero force. Slope: Slope of the best fit line in the contact part of the Force-Distance curve.

Examples

1
2
3
4
5
6
7
8
9
data <- afmReadJPK("force-save-JPK-2h.txt.gz", path = path.package("afmToolkit"))
data <- afmContactPoint(data, width = 20, mul1 = 1, mul2 = 20)
data <- afmDetachPoint(data, width = 40, mul1 = 3, mul2 = 40)
data <- afmBaselineCorrection(data)
data <- afmZeroPointSlope(data, segment = "approach")
## Not run: 
plot(data, segment = "approach") + geom_vline(xintercept = data$Slopes$Z0Point, lty = 2)

## End(Not run)

rbensua/afmToolkit documentation built on Dec. 1, 2020, 2:14 a.m.