Methods for creating and testing for tokens_xptr objects, which are
tokens objects containing pointers to memory locations that can be passed
by reference for efficient processing in tokens_*() functions that modify
them, or for constructing a document-feature matrix without requiring a deep
copy to be passed to dfm().
is.tokens_xptr() tests whether an object is of class
tokens_xtpr.
as.tokens_xptr() coerces a tokens object to an external
pointer-based tokens object, or returns a deep copy of a tokens_xtpr when
x is already a tokens_xtpr object.
Usage
is.tokens_xptr(x)
as.tokens_xptr(x)
# S3 method for class 'tokens'
as.tokens_xptr(x)
# S3 method for class 'tokens_xptr'
as.tokens_xptr(x)Arguments
- x
a tokens object to convert or a
tokens_xptrclass object to deep copy.