i need to create a dynamic repeating well pattern column in R as part of a script to generate an input file for an automated pipetter. The goal is to make a dataframe column that repeats the pattern in wellVec1 a total of repeatValue times, followed by repeating wellVec2 a total of repeatValue times in the same column, and so on until all of the wellVec patterns have been used. It should look like this:
A1
C1
A1
C1
A2
C2
A2
C2
A3
C3
A3
C3
using these simplified examples of the wellVec patterns:
repeatValue <- 2
wellVec1 <- c("A1", "C1")
wellVec2 <- c("A2", "C2")
wellVec3 <- c("A3", "C3")
Thanks for your help!
Aucun commentaire:
Enregistrer un commentaire