expandPaths | R Documentation |
This function takes a humdrumR object and "expands" the content of any spine paths by filling them in with the content of their parent path(s).
expandPaths(x, asSpines)
asSpines |
Should paths expanded into new spines? Defaults to Must be a singleton If |
humdrumR |
HumdrumR data. Must be a humdrumR data object. |
For example, imagine that in humdrum representation of a eight-measure
piano score, the annotator included an ossia
passage in the seventh measure.
If we want to simply ignore the ossia passage, we can just specify a subset()
where Path == 0
.
If we want to study only the ossia passage, we can grab a subset()
where Path == 1
.
However, what if we want to study the ossia as it would be performed, with the ossia measure
swapped in for measure 7, but still using measures 1-6 and 8 from the main path?
expandPaths()
will help us do just this:
expandPaths()
will copy the contents of measure 1-6 and 8 into the second path and,
if asSpines = TRUE
, then copy the path into it's own new spine.
We can then treat that new "full" path/spine just like any other path/spine.
Other Humdrum table reshaping functions:
cleave()
,
collapseHumdrum()
,
rend()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.