follow_up2 {experDesign}R Documentation

Follow up experiments in batches

Description

Design experiment with all the data new and old together.

Usage

follow_up2(all_data, batch_column = "batch", ...)

Arguments

all_data

A data.frame with all the data about the samples. Each row is a sample.

batch_column

The name of the column of all_data with the batches used. If NA it is interpreted as a new data, if not empty it is considered a batch.

...

Arguments passed on to design

size_subset

Numeric value of the number of sample per batch.

omit

Name of the columns of the pheno that will be omitted.

iterations

Numeric value of iterations that will be performed.

name

A character used to name the subsets, either a single one or a vector the same size as n.

Details

If the batch_column is empty the samples are considered new. If the size_subset is missing, it will be estimated from the previous batch Similarly, iterations and name will be guessed or inferred from the samples.

Value

A data.frame with the batch_column filled with the new batches needed.

See Also

follow_up()

Examples

data(survey, package = "MASS")
# Create the first batch
first_batch_n <- 118
variables <- c("Sex", "Smoke", "Age")
survey1 <- survey[seq_len(first_batch_n), variables]
index1 <- design(survey1, size_subset = 50, iterations = 10)
r_survey <- inspect(index1, survey1)
# Create the second batch with "new" students
survey2 <- survey[seq(from = first_batch_n +1, to = nrow(survey)), variables]
survey2$batch <- NA
# Prepare the follow up
all_classroom <- rbind(r_survey, survey2)
follow_up2(all_classroom, size_subset = 50, iterations = 10)

[Package experDesign version 0.3.0 Index]