jasco_tibble: jasco_tibble

Description Usage Arguments Details Examples

View source: R/import.R

Description

This is a function for easy import of data from the Spectrophotometer (JASCO Corp., V-560, Rev. 1.00)

Usage

1
jasco_tibble(filenames, design, treatment, rmflag = F, rmblank = F)

Arguments

filenames

a character vector of file pathes to Jasco .txt files; each element contains the full path to one file. Can be generated e.g. by using the command 'list.files(path, pattern = "*.txt", full.names = T)'

design

a tibble with columns 'Exp_ID', 'Group' and optional 'FLAG'. 'Exp_ID' matches 'Group' to files, 'Group' specifies replicates, e.g. by letters. If rmblank = T rows are removed that match the pattern 'regex("blank", ignore_case = T)' in the 'Group' column. FLAG can be used to exclude files from the analysis, that carry a FLAG - (everything that is not 'NA') by setting 'rmflag = T'.

treatment

a tibble that supplements 'Group' with content. In addition to 'Group' it may contain as many columns as you wish! (e.g. buffer conditions, salt, pH, protein concentration, ...)

rmflag

default to F; if T removes flagged values from tibble (see param 'design')

rmblank

default to F; if T removes rows matching the pattern 'regex("blank", ignore_case = T)' in 'Group'.

Details

Output is a tidy tibble containing a Set_ID (date-time of record), an Exp_ID (basename of provided file), the instrument name and the actual data, which is a Absorbance reading 'Absorbance' as a function of time 'Time_s'. If 'filenames' is a character vector of multiple files, individual tibbles per file are bound by row. See further options below.

Examples

1
2
3
4
design <- read_csv(system.file("extdata", "design.csv", package = "jasco2", mustWork = TRUE))
treatment <- read_csv(system.file("extdata", "treatment.csv", package = "jasco2", mustWork = TRUE))
files <- system.file("extdata", paste0(1:28, ".txt") , package = "jasco2", mustWork = TRUE)
jasco_tibble(filenames = files, design, treatment, rmflag = FALSE, rmblank = TRUE)

mirkko-hub/jasco2 documentation built on Jan. 1, 2021, 2:53 p.m.