Paste a block of PTCell data into a PTPattern
## S4 method for signature 'PTPattern,matrix,numeric,numeric' pasteBlock(pattern, block, row.start, track.start)
pattern |
A |
block |
A |
row.start |
A positive |
track.start |
A positive |
A PTBlock
is not a formal S4 class. It is a matrix
where
each element holds a list
of a single PTCell
object. As
explained at the PTBlock
method documentation, this allows for
a flexible approach of manipulating PTCell
objects. The
pasteBlock
method allows you to paste a PTBlock
back into
a PTPattern
.
Returns a copy of pattern
into which block
is pasted.
Pepijn de Vries
Other block.operations:
PTBlock()
Other pattern.operations:
MODPlugToPTPattern()
,
PTPattern-class
,
PTPattern-method
,
PTPatternToMODPlug()
,
appendPattern()
,
deletePattern()
,
patternLength()
,
patternOrderLength()
,
patternOrder()
data("mod.intro") block <- PTBlock(PTPattern(mod.intro, 1), 1:16, 1) ## Do some operations using lapply (the effect ## code is set to "C10"): block <- matrix(lapply(block, function(x) {(effect(x) <- "C10"); x}), nrow(block), ncol(block), byrow = TRUE) ## Paste block back on the same position: PTPattern(mod.intro, 1) <- pasteBlock(PTPattern(mod.intro, 1), block, 1, 1) ## You can also paste the block anywhere you like: PTPattern(mod.intro, 1) <- pasteBlock(PTPattern(mod.intro, 1), block, 49, 2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.