spines
tabulates the spines and spine paths within the files in a
humdrumR corpus.
spines
is one of humdrumR's
basic corpus summary functions.
Usage
spines(humdrumR, drop = FALSE)
# S3 method for humSpines
[(spineTable, i, drop = FALSE)
# S3 method for humSpines
print(spineTable, showEach = TRUE)
Arguments
- humdrumR
HumdrumR data to summarize.
Must be a humdrumR data object.
- drop
Whether to return normal data.table or a
humCensus
table.Defaults to
FALSE
.Must be a singleton
logical
value: an on/off switch.If
drop = TRUE
, a normal data.table is returned instead of ahumCensus
table.- i
Index for rows.
If
numeric
, selects rows by index. Ifcharacter
, the string is matched as a regular expression against filenames in the corpus.
Details
spines
returns a special data.frame
called a humSpines
table.
A humSpines
table has five columns of information about each piece:
Spines
The number of spines.
Paths
The total number of spine paths.
In
The number of spines which contain any spine paths.
*^
The total number of spine splits (
"*^"
).
*v
The total number of spine joins (
"*v"
).
When humSpine
table prints on the command line, "tallies"
of the unique combinations of spines and paths in the files are also printed.
See also
Other corpus summary functions:
census()
,
humSummary
,
interpretations()
,
reference()
Examples
chorales <- readHumdrum(humdrumRroot, "HumdrumData/BachChorales/*.krn")
#> Finding and reading files...
#> REpath-pattern '/home/nat/.tmp/Rtmpn4KeFS/temp_libpath7af94615c2ed/humdrumR/HumdrumData/BachChorales/*.krn' matches 10 text files in 1 directory.
#> Ten files read from disk.
#> Validating ten files...
#> all valid.
#> Parsing ten files...
#> Assembling corpus...
#> Done!
spines(chorales)
#>
#> ###### Spine structure in humdrumR corpus "chorales" (ten piecess):
#> Spines + Paths In *^ *v
#> ###############################################
#> chor001.krn [ 1] 4 0
#> chor002.krn [ 2] 4 0
#> chor003.krn [ 3] 4 0
#> chor004.krn [ 4] 4 0
#> chor005.krn [ 5] 4 0
#> chor006.krn [ 6] 4 0
#> chor007.krn [ 7] 4 0
#> chor008.krn [ 8] 4 0
#> chor009.krn [ 9] 4 0
#> chor010.krn [10] 4 0
#> ###############################################
#> Spines + Paths In *^ *v
#>
#> Tallies:
#> 10 files with 4 spines
#>