valid-noteinfo: Check note info validity

valid-noteinfoR Documentation

Check note info validity

Description

Check whether a note info string is comprised exclusively of valid note info syntax. noteinfo returns a scalar logical result indicating whether the entire set contains exclusively valid entries.

Usage

informable(x, na.rm = FALSE)

as_noteinfo(x, format = NULL)

is_noteinfo(x)

Arguments

x

character, a note info string.

na.rm

remove NAs.

format

NULL or character, the timestep delimiter format, "space" or "vector".

Details

as_noteinfo() can be used to coerce to the noteinfo class. Coercion will fail if the string is has any syntax that is not valid for note info. Using the noteinfo class is generally not needed by the user during an interactive session, but is available and offers its own print() and summary() methods for note info strings. The class is often used by other functions, and functions that output a note info string attach the noteinfo class.

When format = NULL, the timestep delimiter format is inferred from the note info string input. When unclear, such as with phrase objects, the default is space-delimited time.

Value

depends on the function

See Also

noteinfo(), valid-notes()

Examples

a <- notate("8x", "Start here")
x <- paste(a, "8[stacatto] 8-. 16 4.. 16- 16 2^ 2 4. 8( 4)( 4) 8*4 1 1")

informable(x) # is it of 'noteinfo' class; a validity check for any string
x <- as_noteinfo(x) # coerce to 'noteinfo' class
is_noteinfo(x) # check for 'noteinfo' class
x

summary(x)

tabr documentation built on Sept. 12, 2024, 6:18 a.m.