collapseHumdrum | R Documentation |
collapseHumdrum
allows you collapse a data field across
across groups within the data indicated by the by
argument.
Data is "collapsed" either by pasting the data into a string,
or by putting them into list.
collapseStops
, collapsePaths
, and collapseRecords
are built-in
calls to collapseHumtab
, with some additional optimizations.
collapseHumdrum(
humdrumR,
by,
fields = selectedFields(humdrumR),
dataTypes = "GLIMDd",
collapseAtomic = TRUE,
sep = " "
)
collapseStops(
humdrumR,
fields = selectedFields(humdrumR),
collapseAtomic = TRUE,
sep = " "
)
collapsePaths(
humdrumR,
fields = selectedFields(humdrumR),
collapseAtomic = TRUE,
sep = " "
)
collapseRecords(
humdrumR,
fields = selectedFields(humdrumR),
collapseAtomic = TRUE,
sep = " "
)
humdrumR |
HumdrumR data. Must be a humdrumR data object. |
by |
Fields to collapse data within. Must be Must be Data in the |
fields |
The target field(s) in the Defaults to Must be |
dataTypes |
Which types of humdrum record(s) to collapse. Defaults to Must be |
collapseAtomic |
Whether to collapse the data into Defaults to Must be a singleton If |
sep |
A separator for collapsed strings. Defaults to Must be a single Only has an effect if |
The humdrum folding functions serve a similar function, "folding" data into new fields, rather than collapsing it within a field.
Other Humdrum table reshaping functions:
cleave()
,
expandPaths()
,
rend()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.