Add unknown samples to a plate
Usage
add_samples(
plate,
samples,
time = NA,
conc = NA,
dil = NA,
factor = NA,
dosage = NA,
route = NA,
cmt = NA,
prefix = "S",
vtime = FALSE
)
Arguments
- plate
PlateObj
- samples
A vector representing samples names. Must be unique.
- time
A vector representing time points. If vtime = FALSE, time will propagate to all samples.
- conc
A vector representing concentration. Usefull in case of In Vitro Studies. Must be same length as samples.
- dil
A vector representing dilution factor. Must be same length as samples.
- factor
A vector representing factor. Must be same length as samples.
- dosage
A vector representing dosage. Must be same length as samples.
- route
A vector representing route of administration. Must be same length as samples.
- cmt
A vector representing compartment. Must be same length as samples.
- prefix
A prefix to be added before samples names. Default is "S"
- vtime
A logical. If TRUE, time is a vector of sample length as samples. Default is FALSE
Details
final name will be of form. Prefix-SampleName-Time-Concentration-Factor samples must be a unique vector and did not exist in the plate before. Time is either a vector or a single value. If it is a vector, it will be repeated for each sample. Conc, dil, factor and dosage are either a vector or a single value. If it is a vector, it must be the corrosponding length of samples.
Examples
plate <- generate_96() |>
add_samples(paste0("T", 1:12))
data(Indometh)
plate <- generate_96() |>
add_samples(
samples = Indometh$Subject,
time = Indometh$time,
dosage = "100mg",
route = "IV",
cmt = "plasma",
vtime = TRUE)
plot(plate, color = "samples")
#> Plate not registered. To register, use register_plate()
#> Warning: Removed 30 rows containing missing values or values outside the scale range
#> (`geom_text()`).
plot(plate, color = "time")
#> Plate not registered. To register, use register_plate()
#> Warning: Removed 30 rows containing missing values or values outside the scale range
#> (`geom_text()`).