[Rd] ALTREP string methods for substr and nchar
Jim Hester
j@me@@|@he@ter @end|ng |rom gm@||@com
Thu Dec 19 20:39:28 CET 2019
A useful extension of ALTREP is having two new string methods which
return the number of characters of a given string element and to
return a substring of an element.
Having these methods would allow retrieving these values without
needing to create a CHARSXP for the full element data, which could
potentially be costly for long elements.
For example say you have an ALTREP altstring vector where each element
holds the sequence of a single chromosome, it would be useful to query
the lengths of each chromosome and retrieve the first 100 characters
etc. without having to put the whole chromosome in memory. I realize
there are tools in Bioconductor to handle this particular case, but it
seems the general case would be perfect for ALTREP.
Jim
More information about the R-devel
mailing list