afmReadVeecoFolder: Read all Bruke Nanoscope Veeco ascii files in a folder

Description Usage Arguments Value Examples

View source: R/afmReadVeecoFolder.R

Description

Read all Veeco ascii files in a given folder. It searches for all files containing a given patter (".txt" by default) and uses the afmReadVeeco function.

Usage

1
afmReadVeecoFolder(folder, pattern = ".txt")

Arguments

folder

Name of the folder containing the Veeco files.

pattern

Pattern that will identify the Veeco files (".txt" by default).

Value

An afmexperiment class data structure with all F-d curves.

Examples

1
2
3
folder <- paste(path.package("afmToolkit"), "veecoFolder",sep = "/")
data <- afmReadVeecoFolder(folder = folder)
str(data)

Example output

Loading required package: ggplot2
Veeco file veeco_file1.txt.gz loaded.
Veeco file veeco_file2.txt.gz loaded.
Veeco file veeco_file3.txt.gz loaded.
Veeco file veeco_file4.txt.gz loaded.
List of 4
 $ veeco_file1.txt.gz:List of 2
  ..$ data  :'data.frame':	13312 obs. of  4 variables:
  .. ..$ Time   : num [1:13312] 0 0.000173 0.000346 0.000519 0.000692 ...
  .. ..$ Z      : num [1:13312] 5.4e-07 5.4e-07 5.4e-07 5.4e-07 5.4e-07 ...
  .. ..$ Force  : num [1:13312] -1.82e-09 -1.82e-09 -1.82e-09 -1.80e-09 -1.85e-09 ...
  .. ..$ Segment: Factor w/ 2 levels "approach","retract": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ params:List of 2
  .. ..$ SpringConstant: num 0.0744
  .. ..$ curvename     : chr "veeco_file1.txt.gz"
  ..- attr(*, "class")= chr "afmdata"
 $ veeco_file2.txt.gz:List of 2
  ..$ data  :'data.frame':	13312 obs. of  4 variables:
  .. ..$ Time   : num [1:13312] 0 0.000173 0.000346 0.000519 0.000692 ...
  .. ..$ Z      : num [1:13312] 5.4e-07 5.4e-07 5.4e-07 5.4e-07 5.4e-07 ...
  .. ..$ Force  : num [1:13312] -6.45e-10 -6.33e-10 -6.03e-10 -6.27e-10 -6.41e-10 ...
  .. ..$ Segment: Factor w/ 2 levels "approach","retract": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ params:List of 2
  .. ..$ SpringConstant: num 0.0744
  .. ..$ curvename     : chr "veeco_file2.txt.gz"
  ..- attr(*, "class")= chr "afmdata"
 $ veeco_file3.txt.gz:List of 2
  ..$ data  :'data.frame':	13312 obs. of  4 variables:
  .. ..$ Time   : num [1:13312] 0 0.000173 0.000346 0.000519 0.000692 ...
  .. ..$ Z      : num [1:13312] 5.4e-07 5.4e-07 5.4e-07 5.4e-07 5.4e-07 ...
  .. ..$ Force  : num [1:13312] -6.48e-10 -6.40e-10 -6.48e-10 -6.52e-10 -6.46e-10 ...
  .. ..$ Segment: Factor w/ 2 levels "approach","retract": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ params:List of 2
  .. ..$ SpringConstant: num 0.0744
  .. ..$ curvename     : chr "veeco_file3.txt.gz"
  ..- attr(*, "class")= chr "afmdata"
 $ veeco_file4.txt.gz:List of 2
  ..$ data  :'data.frame':	13289 obs. of  4 variables:
  .. ..$ Time   : num [1:13289] 0 0.000174 0.000347 0.000521 0.000695 ...
  .. ..$ Z      : num [1:13289] 3.49e-07 3.49e-07 3.49e-07 3.49e-07 3.49e-07 ...
  .. ..$ Force  : num [1:13289] -6.98e-10 -7.08e-10 -7.08e-10 -6.93e-10 -6.88e-10 ...
  .. ..$ Segment: Factor w/ 2 levels "approach","retract": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ params:List of 2
  .. ..$ SpringConstant: num 0.0744
  .. ..$ curvename     : chr "veeco_file4.txt.gz"
  ..- attr(*, "class")= chr "afmdata"
 - attr(*, "class")= chr "afmexperiment"

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