afmReadJPK: Read Nanowizard JPK ascii file

Description Usage Arguments Value Examples

View source: R/afmReadJPK.R

Description

Read an ascii JPK file.

Reads an ascii JPK file with one to three headers.

Usage

1
2
afmReadJPK(filename, path = "", FColStr = "Vertical", 
ZColStr = "Height (measured & smoothed)", tColStr = "Segment Time")

Arguments

filename

String with the name of the jpk file.

path

Path to the folder where the file is.

FColStr

String with a pattern identifying the Force column.

ZColStr

String with a pattern identifying the Z column.

tColStr

String with a pattern identifying the Time column.

Value

A list containing a field 'data' which is a data frame

Examples

1
2
data <- afmReadJPK("force-save-JPK-3h.txt.gz",path = path.package("afmToolkit"))
str(data)

Example output

Loading required package: ggplot2
JPK file force-save-JPK-3h.txt.gz loaded. 3 headers found.
List of 2
 $ data  :'data.frame':	22527 obs. of  4 variables:
  ..$ Z      : num [1:22527] 8.32e-06 8.32e-06 8.32e-06 8.32e-06 8.32e-06 ...
  ..$ Force  : num [1:22527] -1.83e-07 -1.83e-07 -1.84e-07 -1.84e-07 -1.84e-07 ...
  ..$ Time   : num [1:22527] 0.000244 0.000732 0.00122 0.001707 0.002195 ...
  ..$ Segment: Factor w/ 3 levels "approach","pause",..: 1 1 1 1 1 1 1 1 1 1 ...
 $ params:List of 2
  ..$ SpringConstant: num 52.9
  ..$ curvename     : chr "force-save-JPK-3h.txt.gz"
 - attr(*, "class")= chr "afmdata"

afmToolkit documentation built on May 1, 2019, 9:20 p.m.