decode: Decode

View source: R/coded-vec.R

decodeR Documentation

Decode

Description

Decodes an object from an integer-based encoding.

Usage

decode(x, x_type = type(x))

decode_pc_set(x)

decode_pc_chord_type(x)

decode_pc_chord(x)

Arguments

x

Object to decode.

x_type

(Character scalar) The type that x is intended to represent (e.g. "pc_chord").

Details

The decode function is vectorised and uses precomputed encodings. The following functions represent alternative implementations that are not vectorised and do not rely on precomputed encodings:

  • decode_pc_set

  • decode_pc_chord_type

  • decode_pc_chord

Value

decode returns an object of class vec; the other functions return integer vectors.

See Also

encode for the reverse operation.


pmcharrison/hrep documentation built on Feb. 18, 2024, 2:33 a.m.