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.

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".

Value

depends on the function

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.

See also

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
#> [1] TRUE
x <- as_noteinfo(x) # coerce to 'noteinfo' class is_noteinfo(x) # check for 'noteinfo' class
#> [1] TRUE
x
#> <Note info string> #> Format: space-delimited time #> Values: 8x;^"Start_here" 8[stacatto] 8-. 16 4.. 16- 16 2^ 2 4. 8( 4)( 4) 8 8 8 8 1 1
summary(x)
#> <Note info string> #> Timesteps: 19 #> Format: space-delimited time #> Values: 8x;^"Start_here" 8[stacatto] 8-. 16 4.. 16- 16 2^ 2 4. 8( 4)( 4) 8 8 8 8 1 1