Skip to contents

Creates a data frame where each sample loaded into the microplate wells has a separate attribute.

Usage

resample_vect_scale(df, tnp, cycles, method = c("normal", "brute", "vector"))

Arguments

df

A clean data frame with attributes or tuples containing a mixture of samples.

tnp

A numeric value indicating the number of rows used. TNP is used as an acronym for Test, Negative, Positive.

cycles

A numeric value indicating the number of cycles selected by the user when running the FLUOstar instrument.

method

A string 'normal', 'brute' or 'vector' to specify the method of resampling.

Value

A new data frame where separated samples are assigned a separate attribute or column.

Note

This is the pseudo-vectorized approach and should be a more efficient function. This function will produce a vertical layout as defined in this package. This function inspired by the lapply approach pretty much applies the

See also

resample_dat_vect()

resample_dat_vect(). As a matter of fact, I took this approach to create compatibility with lapply and rapply but that failed.

Author

Tingwei Adeck

Examples

fpath <- system.file("extdata", "dat_3.dat", package = "normfluodbf", mustWork = TRUE)
dat_df <- read.table(file=fpath)
nocomma_dat <- clean_odddat_optimus(dat_df)
alt_test_scale <- resample_vect_scale(nocomma_dat,3,40, method = 'brute')
alt_test_scale <- resample_vect_scale(nocomma_dat,3,40, method = 'normal')
alt_test_scale <- resample_vect_scale(nocomma_dat,3,40, method = 'vector')
alt_test_scale_norm <- lapply(alt_test_scale, min_max_norm)