Description Important Functions Discussion See Also
Functions to help implement the extraction / subsetting / indexing function '[' and replacement function '[<-' of custom matrix-like types (based on S3, S4, etc.), modeled as closely to the base matrix class as possible (with tests to prove it).
extract:Create an implementation of [ for custom matrix-like types.
replace:Create an implementation of [<- for custom matrix-like
types.
convertIndex:Convert non-numeric index types to positive integers.
R used to export functions for index conversion such as
makeSubscript, vectorSubscript, and arraySubscript in
src/main/subscript.c to package developers until R 2.3.1. These
exports were removed in R 2.4.0 as part of a
cleanup.
arraySubscript was later
re-added
as some packages such as arules and cba still rely on it. I still need to
investigate whether arraySubscript would be useful for this package.
vignette("StringMatrix", package = "crochet") for a vignette
containing a full example for a custom type.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.