write_quadtree_ptr | R Documentation |
Quadtree
This is for debugging only, and users should never need to use
this function - use write_quadtree()
instead.
write_quadtree()
serializes the CppQuadtree
object
(note that the underlying C++ object is actually called
QuadtreeWrapper
, but it is exposed to R as CppQuadtree
) stored
in the ptr
slot of Quadtree
.
This function, however, serializes only the Quadtree
object contained by the
QuadtreeWrapper
.
## S4 method for signature 'character,Quadtree'
write_quadtree_ptr(x, y)
x |
character; the filepath to read from or write to |
y |
a |
no return value
library(quadtree)
habitat <- terra::rast(system.file("extdata", "habitat.tif", package="quadtree"))
qt <- quadtree(habitat, .1)
path <- tempfile(fileext = "qtree")
write_quadtree_ptr(path, qt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.