View source: R/recolorize_to_patternize.R
recolorize_to_patternize | R Documentation |
Convert from a recolorize
object to a list of RasterLayer objects, the
format required by the patternize
package. Note that most of the downstream
patternize
functions that require lists of RasterLayer objects mostly
require lists of these lists, so you will probably need to use this function
on a list of recolorize
objects.
recolorize_to_patternize(recolorize_obj, return_background = FALSE)
recolorize_obj |
A |
return_background |
Logical. |
Note that this function does not retain the colors of the layers – you won't be able to convert back to a recolorize object from this object.
A list of RasterLayer objects, one per color class.
# fit recolorize object:
img <- system.file("extdata/ephippigera.png", package = "recolorize")
rc <- recolorize2(img)
# takes ~10 sec to run:
# convert to a raster list:
as_raster_list <- recolorize_to_patternize(rc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.