Learn R Programming

tabr (version 0.5.1)

double-bracket: Double bracket methods for tabr classes

Description

Double bracket indexing and assignment. See tabr-methods() for more details on methods for tabr classes.

Usage

# S3 method for noteworthy
[[(x, i)

# S3 method for noteinfo [[(x, i)

# S3 method for music [[(x, i)

# S3 method for lyrics [[(x, i)

# S3 method for noteworthy [[(x, i) <- value

# S3 method for noteinfo [[(x, i) <- value

# S3 method for music [[(x, i) <- value

# S3 method for lyrics [[(x, i) <- value

Arguments

x

object.

i

index.

value

values to assign at index.

See Also

tabr-methods(), note-metadata()

Examples

Run this code
# noteworthy class examples
x <- as_noteworthy("a, b, c ce_g")
x[[3]]
x[[2]] <- paste0(transpose(x[2], 1), "~")
x

# noteinfo class examples
x <- as_noteinfo(c("4-", "t8(", "t8)", "t8x"))
x[[3]]
x[[3]] <- c("t8]")
x

# music class examples
x <- as_music("c,~4 c,1 c'e_'g'4-.*2")
x[[3]]
x[[3]] <- "c'e'g'8"
x

Run the code above in your browser using DataLab