Description Usage Arguments Value Examples
Takes a simple random sample of sample_size
pixels from a JPEG file.
1 | sample_pixels(file, sample_size = 50)
|
file |
path to JPEG file |
sample_size |
Number of pixels to sample |
tibble with sample_size
rows, and columns R, G and B
1 2 3 4 5 6 7 | example_jpg <- system.file("extdata", "example.JPG", package = "routes")
set.seed(4891)
sample_pixels(example_jpg, 10)
sample_pixels(example_jpg, 10) %>%
with(colorspace::RGB(R, G, B)) %>%
colorspace::hex() %>%
pal()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.