View source: R/model-corpdiss.R
| corpus_dissonance_table | R Documentation | 
Derives sufficient information from a corpus to formulate a corpus-based dissonance model.
corpus_dissonance_table(x, type = "pc_chord_type", add = 1L)
## S3 method for class 'corpus'
corpus_dissonance_table(x, type = "pc_chord_type", add = 1L)
| x | Corpus to analyse, as created by  | 
| type | (Scalar character) Representation to which chords should be coerced before counting. | 
| add | (Scalar numeric) Number to add to each count before computing probabilities. This is useful for ensuring that chord probabilities exceed zero. | 
Returns an object of class corpus_dissonance_table,
a tibble where each row corresponds to a
different pitch-class chord type (i.e. an object of class pc_chord_type),
with the mapping between integer indices and chord types defined by
the hrep package.
This tibble contains the following columns:
| count | The number of times the chord type was observed in the corpus. | 
| prob | The inferred probability of that chord type. | 
| log_prob | The inferred log probability of that chord type. | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.