View source: R/read_texture_analyzer_tab.R
read_texture_analyzer_tab | R Documentation |
Reads a texture analyzer file from the disk. The units are assumed to mm for the distance, and g for the force
read_texture_analyzer_tab(file, chuck_diameter = 0.004,aggregate_by="Distance",downup=TRUE,dec=".",skip_lines=1,unit_line=1,sep="",Force_column="Force",Distance_column="Distance",use_fill_for_read_table=FALSE)
file |
File path for the tabulated text file. |
chuck_diameter |
Diameter of the chuck used to compress the gel. Indication in meters, the chuck is assumed to be circular. |
aggregate_by |
Column to be used for aggregation. Provide FALSE if no aggregation is desired. If |
downup |
Chuck displacement down (compression) followed by equal movement up (release)? |
dec |
Decimal point when reading the text files |
skip_lines |
Possibility to skip lines in front of the actual to data to read |
unit_line |
Is there a line in the text file (after the variable names) that contains unit information? If yes pass 1, otherwise 0 |
sep |
Separator to be passed to read.table |
Force_column |
Name of the column where the force is stored. The expected unit is grams for now |
Distance_column |
Name of the column where the distance travelled by the chuck is stored. The expected unit is mm for now |
use_fill_for_read_table |
Set the fill argument to read.table, used internally. Provide TRUE if there are incomplete lines in the .tab files that should be completed with empty columns |
The routine expects the file to contain force data from both the downward trajectory and the upward trajectory; it assigns the first half of the points to the down trajectory, and the second half to the up trajectory
Dataframe with the following columns:
Distance |
Distance of downward movement of the chuck, as given by the texture analyzer; the units are expected to be in mm |
Force |
Force as measured by the Texture Analyzer, in grams |
direction |
Interpretation in terms of downward and upward movement, possible values are "down" and "up" |
Time |
Time of acquisition, as given by the Texture Analyzer |
pressure |
Calculated pressure (stress) exercised by the chuck; since pressure is given by force / area, the area is estimated from the |
Thomas Braschler
path = system.file('sampleData', package = 'textureAnalyzerGels'); sampleGel = read_texture_analyzer_tab(paste(path,"sampleGel.tab",sep="/"),chuck_diameter=4e-3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.