encode | R Documentation |
Transforms a given object into an integer-based encoding.
encode(x)
encode_pc_set(x)
encode_pc_chord_type(x)
encode_pc_chord(x)
## S3 method for class 'vec'
encode(x)
## S3 method for class 'coded_vec'
encode(x)
## S3 method for class 'corpus'
encode(x)
decode.corpus(x)
## S3 method for class 'pc_chord_type'
encode(x)
## S3 method for class 'pc_chord'
encode(x)
## S3 method for class 'pc_set_type'
encode(x)
## S3 method for class 'pc_set'
encode(x)
x |
Object to encode, as created by
|
Encoding is currently defined for the following types:
pc_set
pc_set_type
pc_chord
pc_chord_type
An error will be thrown when trying to encode objects of other types.
The encode
function is vectorised and uses precomputed encodings.
The following functions represent alternative implementations
that are not vectorised and
do not rely on precomputed encodings.
Note that these alternative implementations do not necessarily
perform systematic input checking.
encode_pc_set
encode_pc_chord_type
encode_pc_chord
Encoded object.
decode
for the reverse operation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.