mod <- pt2_read_mod(pt2_demo())
## select a specific cell from the first pattern
cell <- pt2_cell(mod$patterns[[1]], 0L, 0L)
## get the sample number used in this cell
pt2_instrument(cell)
## Replace the instrument in all cells of
## pattern 1 with sample number 3:
pt2_instrument(mod$patterns[[1]][]) <- 3
Run the code above in your browser using DataLab