combine_data_with_layout: Function specific to read layout files .csv

View source: R/combine_data_with_layout.R

combine_data_with_layoutR Documentation

Function specific to read layout files .csv

Description

This function recive as argument a dataframe (data) which is given for one of the functions(read_spectramax_data, read_multiscango_data, read_fluorstar_data). Also, the type of machine(spectramax, multiscango or fluorstar) and the path to the layout files. This function can take many layout files as argument.

Usage

combine_data_with_layout(
  df_data,
  reader_type,
  dir_layout_files = NULL,
  layout_file_pattern = NULL,
  layout_files = NULL,
  layout_file_name = NULL
)

Arguments

df_data

dataframe tidy

reader_type

string with the name of one the reader machines

dir_layout_files

specified the directory in which gather the files

layout_file_pattern

specified pattern to match the file names

layout_files

name of layout files

layout_file_name

optional argument to assign name to plates

Details

combine_data_with_layout returns a dataframe with the data in the raw files and in the layout files.

Examples

file_path <- system.file("extdata", "test_layout_file.csv",
package = "mpxtractor")

data_file <- system.file("extdata",
"test_gr_spectramax.txt",
package = "mpxtractor")
df_spectramax_outdata_1 <- mpxtractor::read_spectramax_data(data_file)

# Data is store as a tibble
data_layout <- combine_data_with_layout(
 df_spectramax_outdata_1,
 reader_type = "spectramax",
 layout_files = file_path
)

# Now data is tidy
head(data_layout)

MartinBanchero/mpxtractor documentation built on March 30, 2022, 10:56 p.m.