[R-sig-Geo] apply monte carlo simulation for each cell in a matrix (originally raster)
dprosser at usgs.gov
Tue Mar 13 06:30:18 CET 2012
Robert, thank you very much! I believe this sets me on the right path.
2 issues I'm looking into:
1) I do receive an S4 error after the as.matrix(x) step:
/Error in as.vector(data) :
no method for coercing this S4 class to a vector/
2) Perhaps related, I'm not sure if I'm losing the variance measures around
the estimate (mean risk) or if I'm not using the correct function to
retrieve them. For example, "summary(node)" should give me the median, mean,
2.5% and 97.5% variance measures for each cell. "summary(x)" gives me:
NAs : 0
1st Qu. 114.10
3rd Qu. 130.90
which is information summarized across the matrix.
[1,] 142.13677 125.7188
[2,] 75.59303 128.8319
Ultimately, I want matrix/raster outputs for mean risk, plus the upper and
Will keep digging. Thank you for your time!
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/apply-monte-carlo-simulation-for-each-cell-in-a-matrix-originally-raster-tp7367094p7367555.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo