as_narrow_array.NULL | R Documentation |
These methods return an narrow_array()
for R objects that don't involve
copying or unnecessary allocating. Two excpetions are (1) ALTREP objects,
which will be expanded, and (2) character vectors, which will be converted
to UTF-8 and serialized as a single raw()
vector.
## S3 method for class ''NULL''
as_narrow_array(x, ..., name = "")
## S3 method for class 'logical'
as_narrow_array(x, ..., name = "")
## S3 method for class 'integer'
as_narrow_array(x, ..., name = "")
## S3 method for class 'double'
as_narrow_array(x, ..., name = "")
## S3 method for class 'character'
as_narrow_array(x, ..., name = "")
## S3 method for class 'factor'
as_narrow_array(x, ..., name = "")
## S3 method for class 'raw'
as_narrow_array(x, ..., name = "")
## S3 method for class 'data.frame'
as_narrow_array(x, ..., name = "", nullable = FALSE)
x |
An object to convert to an |
... |
Passed to S3 methods |
name |
An optional name |
nullable |
|
An narrow_array()
as_narrow_array(NULL)
as_narrow_array(c(TRUE, FALSE, NA))
as_narrow_array(1:10)
as_narrow_array(c(1.1, 2.2))
as_narrow_array(as.raw(0x00))
as_narrow_array("fish")
as_narrow_array(data.frame(x = 1:10, y = as.raw(1:10)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.