The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
The {fastpng}, {png} and
{jpeg} packages allow images to be loaded directly as
native raster images.
png_file <- system.file("image", "deer-1.png", package="nara")
jpg_file <- system.file("image", "deer-1.jpg", package="nara")These packages will also automatically detect and save native raster images
raster image to/from native raster
image formatras <- matrix(c('brown', 'darkblue', 'darkblue', 'brown'), 2, 2)
ras
#> [,1] [,2]
#> [1,] "brown" "darkblue"
#> [2,] "darkblue" "brown"
class(ras)
#> [1] "matrix" "array"
grid.raster(ras, interpolate = FALSE)nr <- nara::raster_to_nr(ras)
nr
#> <nativeRaster> object: rows:2 cols:2
class(nr)
#> [1] "nativeRaster"
plot(nr)array image to/from native raster
image formatarr <- array(c(
1, 1, 0,
0, 0, 0,
0, 0, 0,
1, 1, 0
), dim = c(2, 2, 3))
arr
#> , , 1
#>
#> [,1] [,2]
#> [1,] 1 0
#> [2,] 1 0
#>
#> , , 2
#>
#> [,1] [,2]
#> [1,] 0 0
#> [2,] 0 0
#>
#> , , 3
#>
#> [,1] [,2]
#> [1,] 0 1
#> [2,] 1 0
class(arr)
#> [1] "array"
grid.raster(arr, interpolate = FALSE)nr <- nara::array_to_nr(arr)
nr
#> <nativeRaster> object: rows:2 cols:2
class(nr)
#> [1] "nativeRaster"
plot(nr)These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.