Hello, I am a graduate student of University of Florida. I am trying to run a process variation model and I am facing the following error. ------------------------------------------------------------- Analysis of geostatistical data For an Introduction to geoR go to http://www.leg.ufpr.br/geoR geoR version 1.6-27 (built on 2009-10-15) is now loaded ------------------------------------------------------------- grf: generating grid 300 * 300 with 90000 points grf: process with 1 covariance structure(s) grf: nugget effect is: tausq= 0 grf: covariance model 1 is: spherical(sigmasq=1, phi=0.1) grf: simulation using the function GaussRF from package RandomFields Error in DoSimulateRF(n = n, reg = register, paired = paired) : .Random.seed is not an integer vector but of type 'double' I tried to trace back the source of the error but installations seem correct to me. rm(.Random.seed) does not work in my case. Can anyone please help me in this? The only thing I am doing at the starting of the program is initialization of the variables. .Random.seed<-1 Also I tried running example programs from geoR package. I get the same error as previous. Sincerely, Maddy -- View this message in context: http://n4.nabble.com/the-error-in-DoSimulateRF-function-tp1592572p1592572.html Sent from the R help mailing list archive at Nabble.com.
maddy wrote:> > Error in DoSimulateRF(n = n, reg = register, paired = paired) : > .Random.seed is not an integer vector but of type 'double' > > I tried to trace back the source of the error but installations seem > correct to me. > rm(.Random.seed) does not work in my case. > >You told us very little. This looks like you are using some old packages with a new R system: Since R 2.8.0>>Use of a non-integer .Random.seed is now an error. (R itself has nevergenerated such values, but user code has, and R >= 2.6.0 has given a warning.) >> So best update your system. If this does not work, create a dummy example with very few data that reproduces the problem. If you can do that, send the example to the package maintainer; could be that there is some old code involved. Dieter -- View this message in context: http://n4.nabble.com/the-error-in-DoSimulateRF-function-tp1592572p1592613.html Sent from the R help mailing list archive at Nabble.com.
Hello Sir, Thanks for reply. The SessionInfo() gives the following output, R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] RandomFields_1.3.41 geoR_1.6-27 sp_0.9-61 loaded via a namespace (and not attached): [1] grid_2.10.1 lattice_0.17-26 tools_2.10.1 I tried to reduce the data points but error remains the same. Also, I tried to run one of the examples given in the geoR documentation manual (shown as follows) but I get the same error # a "smallish" simulation pg30 - geoR documentation sim2 <- grf(441, grid = "reg", cov.pars = c(1, .25)) image(sim2) Sincerely, Madhura -- View this message in context: http://n4.nabble.com/the-error-in-DoSimulateRF-function-tp1592572p1592646.html Sent from the R help mailing list archive at Nabble.com.
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.