View source: R/read_mecmesin_tab_list.R
read_mecmesin_tab_list | R Documentation |
Reads a series of texture analyzer tab files
read_mecmesin_tab_list(file_info,root_folder=getwd(),folder_column="Folder",file_column="File", sample_diameter_column="diameter_mm",do_plot=TRUE,do_smoothing=TRUE,lines_to_read=NULL,downup=TRUE,...)
file_info |
Dataframe describing the files to be read. Needs to contain at least the following columns: 1. A folder column, describing the sub-folder where the individual files are located. The name of this column is given by the argument |
root_folder |
Common root folder where all the tab-files to be read are located, defaults to the current working directory as given by getwd. |
folder_column |
Name of the column in |
file_column |
Name of the column in |
sample_diameter_column |
Name of the column in |
do_plot |
Indicates whether or not plots should be drawn while reading the files |
do_smoothing |
Indicates whether or not smoothing by smooth_texture_analyzer_data should be performed when reading the files |
lines_to_read |
Possibility to restrict the lines to be read, a numerical vector indicating the lines to be read. |
downup |
sample displacement down (compression) followed by equal movement up (release)? |
... |
Additional arguments to be passed to smooth_texture_analyzer_data. These arguments should be named according to the arguments given in smooth_texture_analyzer_data |
The function will run through all the lines of file_info
and read the file specified by the file and folder columns (which need to be located within folder given by the root_folder
argument). To do so, it uses read_mecmesin_tab, and, if do_smoothing
is TRUE
, smooth_texture_analyzer_data as well. If do_plot
is true, it will plot the data for each line as well. The lines_to_read
argument can be used to restrict the file reading to certain lines; this is primarily for debugging purposes, as the function may take quite a long time if there are many entries in file_info
.
A list with as many elements as there are rows in file_info
. Each element in the list is the output of read_mecmesin_tab, optionally processed by smooth_texture_analyzer_data
Thomas Braschler, Patrick Burch
Filippova A, Bonini F, Efremov L, Locatelli M, Preynat-Seauve O, Beduer A, Krause KH, Braschler T, 2021: Neurothreads: development of supportive carriers for mature dopaminergic neuron differentiation and implantation, Raw data set: https://doi.org/10.5281/zenodo.4441090 accompanying the corresponding scientific publication at Biomaterials (https://doi.org/10.1016/j.biomaterials.2021)
# The data for this example is taken from https://doi.org/10.5281/zenodo.4441090 (Filippova et al. 2021), Supplementary_Fig_S6.zip, sample2 and sample3 for the traction test. From there, we copied the file "raw-TensileStrenght(peellike)(V1)-Modified Version-sample-2.txt" and "raw-TensileStrenght(peellike)(V1)-Modified Version-sample-3.txt" data files, as well as the file listing "files_stretch.xlsx" for these two data files here to serve as an example. path = system.file('sampleData/mecmesin', package = 'textureAnalyzerGels'); tensile_test_file_info = read.xls(file.path(path,"files_stretch.xlsx") ) tensile_test_data=read_mecmesin_tab_list(tensile_test_file_info,root_folder=path,do_smoothing=TRUE,do_plot=TRUE,downup=FALSE,sd=0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.