This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.
library(raster)
toy<- raster(ncol=5,nrow=5,xmn=100,xmx=150,
ymn=100,ymx=150)## pixeles de ese raster es de 25
toy
class : RasterLayer
dimensions : 5, 5, 25 (nrow, ncol, ncell)
resolution : 10, 10 (x, y)
extent : 100, 150, 100, 150 (xmin, xmax, ymin, ymax)
crs : NA
#3 notiene valores
## hay que llenar
values(toy)<-rnorm(n=25,mean = 0.4,sd=0.15)## llenar de datos el raster con datos que simulan una distribucion normal
values(toy)
[1] 0.4900900 0.4737740 0.5968681 0.4658505 0.4646939 0.2326567 0.2988936 0.7610042 0.3097503 0.4160675 0.3507249 0.1861105
[13] 0.3853827 0.3432449 0.5660140 0.5807238 0.6237516 0.6441131 0.2857807 0.6212824 0.3777996 0.2904377 0.2087270 0.5126645
[25] 0.4000112
plot(toy)
text(toy*100)
hist(toy)