[R] the error in DoSimulateRF function
Dieter Menne
dieter.menne at menne-biomed.de
Mon Mar 15 08:38:12 CET 2010
maddy wrote:
>
> Thanks for the help. I was able to run the code by removing random seed
> statement and putting
> set.seed(1)
>
And the full example is show below. Please, next time, post it immediately,
and you will get an answer withing minutes, sometimes.
Dieter
library(geoR)
.Random.seed<-1L # Make this an integer
N<-300
phi <- 0.25
get_spherical_map <- function(N,phi) {
sim<-grf(N*N,grid="reg",cov.model="spherical",cov.pars=c(1,phi),method="RF")
sim$data <- (sim$data - mean(sim$data)) / sd(sim$data)
local <- array(sim$data, dim=c(N,N))
}
# a "smallish" simulation pg30 - geoR documentation
sim2 <- grf(441, grid = "reg", cov.pars = c(1, .25))
image(sim2)
--
View this message in context: http://n4.nabble.com/the-error-in-DoSimulateRF-function-tp1592572p1593021.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list