[R] *** caught segfault *** address 0x18, cause 'memory not mapped'
Hello R Community, I've been run the following codes. However, I've been getting an unusual segfault that I'm unable to trace its origin. Please give me a light to decipher the "caught segfault" Thanks for you attention. Bernardo. > options(STERM='iESS', editor='emacsclient') > rm(list = ls()) > > source("fgenIGLD.R")#RNG of IGLD(mu,b,sigma) > > source("fsYUTH.R") #the fucntions Y,U,Tbbarran and H necessary to > > calcualte the hat{b} > > source("fMLEPFP.R") #the maximun likelihood profile estimation of > > IGLD(mu,sigma) > > source("f04P.R")#it to compute the mle, jacknife and bootstrap > > source("fprofileloglik06.R") #the log-likelihood profile of IGLD(mu,sigma) > > source("fmgfIGLD.R")#read the fmgfIGLD.R file defining the fmgfIGLD > > function. It is useful for the prox. > > source("f02.R")#here the function kappas.and.deriv(n, > > source("fsimbiasIGLDP.R")#it to compute de bias of jacknife and > > bootstrap > > source("f01P.R") #in this is "fmainsimbiasP" > > ptm<-proc.time() > sink("out22031001.txt") > > fmainsimbiasP(1,100) proc.time()-ptm *** caught segfault *** address 0x18, cause 'memory not mapped' Traceback: 1: nlm(f = fprof_deriv, x = x, p = parHInt, b = parFIX, hessian = T, iterlim = 2000, check.analyticals = F, stepmax = 10) 2: doTryCatch(return(expr), name, parentenv, handler) 3: tryCatchOne(expr, names, parentenv, handlers[[1]]) 4: tryCatchList(expr, classes, parentenv, handlers) 5: tryCatch(expr, error = function(e) {call <- conditionCall(e) if (!is.null(call)) {if (identical(call[[1]], quote(doTryCatch))) call <- sys.call(-4)dcall <- deparse(call)[1]prefix <- paste("Error in", dcall, ": ") LONG <- 75msg <- conditionMessage(e)sm <- strsplit(msg, "\n")[[1]]if (14 + nchar(dcall, type = "w") + nchar(sm[1], type = "w") > LONG) prefix <- paste(prefix, "\n ", sep = "")}else prefix <- "Error : " msg <- paste(prefix, conditionMessage(e), "\n", sep = "") .Internal(seterrmessage(msg[1]))if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()).Internal(printDeferredWarnings()) }invisible(structure(msg, class = "try-error"))}) 6: try(nlm(f = fprof_deriv, x = x, p = parHInt, b = parFIX, hessian = T, iterlim = 2000, check.analyticals = F, stepmax = 10), silent = T) 7: fMLEPFP(datanpboot, FALSE) 8: fboot.jack.mleP(data, B) 9: fsimbiasIGLDP(N[i], parH[, j], R, B) 10: fmainsimbiasP(1, 100) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection: Selection: Selection: 2 Save workspace image? [y/n/c]: n Process R:2 finished at Thu Mar 25 08:06:26 2010 >sessionInfo() R version 2.7.2 beta (2008-08-16 r46368) i486-pc-linux-gnu locale: LC_CTYPE=es_CL.UTF-8;LC_NUMERIC=C;LC_TIME=es_CL.UTF-8;LC_COLLATE=es_CL.UTF-8;LC_MONETARY=C;LC_MESSAGES=es_CL.UTF-8;LC_PAPER=es_CL.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=es_CL.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base > version _ platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu status beta major 2 minor 7.2 year 2008 month 08 day16 svn rev46368 language R version.string R version 2.7.2 beta (2008-08-16 r46368) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] postscript, greek lellters
The problem is of the .dvi. It was arranged,using the solution of Baptiste. Bernardo. 2010/1/9 bernardo lagos alvarez : > Thank you, Dennis and Baptisite > > By including the. eps in my . tex and the compilation of the .tex, > this does not generate the symbol of the greek letter. > > Bernardo. > > 2010/1/9 baptiste auguie : >> Hi, >> >> Something like this maybe, >> >> plot.new() >> >> lab = expression(bar(T)*"("*-x*" ; "*alpha*")"-G*"("*x*" ; "*alpha*" , >> "*J*")") >> >> text(0.5,0.5,lab) >> >> ?plotmath >> >> HTH, >> >> baptiste >> >> 2010/1/8 bernardo lagos alvarez : >>> Dear useRs, >>> >>> How can I, writting the correct greek letter using postscrip or pdf >>> function. >>> >>> In my figures appears only the first letter (a of alpha, n of nu) >>> when include the graphs in my .tex doxument. I am using >>> >>> title( expression(bar(T)(paste(-x,";",alpha))-G(paste(x,";",alpha,",",J >>> title( expression(bar(T)(paste(-x,";"~alpha))-G(paste(x,";"~alpha,",",J >>> title( expression(bar(T)(paste(-x,";"*alpha))-G(paste(x,";"*alpha,",",J, >>> not work. >>> >>>>sessionInfo() >>> R version 2.9.0 (2009-04-17) >>> i386-pc-mingw32 >>> >>> locale: >>> LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 >>> >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> >>> >>> Thanks for your help, >>> >>> Bernardo. >>> >>> __ >>> R-help@r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >>> >> > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] postscript, greek lellters
Thank you, Dennis and Baptisite By including the. eps in my . tex and the compilation of the .tex, this does not generate the symbol of the greek letter. Bernardo. 2010/1/9 baptiste auguie : > Hi, > > Something like this maybe, > > plot.new() > > lab = expression(bar(T)*"("*-x*" ; "*alpha*")"-G*"("*x*" ; "*alpha*" , > "*J*")") > > text(0.5,0.5,lab) > > ?plotmath > > HTH, > > baptiste > > 2010/1/8 bernardo lagos alvarez : >> Dear useRs, >> >> How can I, writting the correct greek letter using postscrip or pdf function. >> >> In my figures appears only the first letter (a of alpha, n of nu) >> when include the graphs in my .tex doxument. I am using >> >> title( expression(bar(T)(paste(-x,";",alpha))-G(paste(x,";",alpha,",",J >> title( expression(bar(T)(paste(-x,";"~alpha))-G(paste(x,";"~alpha,",",J >> title( expression(bar(T)(paste(-x,";"*alpha))-G(paste(x,";"*alpha,",",J, >> not work. >> >>>sessionInfo() >> R version 2.9.0 (2009-04-17) >> i386-pc-mingw32 >> >> locale: >> LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> >> Thanks for your help, >> >> Bernardo. >> >> __ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] postscript, greek lellters
Dear useRs, How can I, writting the correct greek letter using postscrip or pdf function. In my figures appears only the first letter (a of alpha, n of nu) when include the graphs in my .tex doxument. I am using title( expression(bar(T)(paste(-x,";",alpha))-G(paste(x,";",alpha,",",J title( expression(bar(T)(paste(-x,";"~alpha))-G(paste(x,";"~alpha,",",J title( expression(bar(T)(paste(-x,";"*alpha))-G(paste(x,";"*alpha,",",J, not work. >sessionInfo() R version 2.9.0 (2009-04-17) i386-pc-mingw32 locale: LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base Thanks for your help, Bernardo. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] please, a help or information
Hi users R list I have been running some codes for some simulations. Such intensive use runif, nlm and simpleError("...") functions no more. But still remain the error that has been greatly discussed in the list of users of R, the problem !crashes RGui.¡ "R for Windows GUI front-end has encountered a problem and needs to close. We are sorry for the inconvenience." here are the details of the crash: AppName: rgui.exe AppVer: 2.81.47281.0 ModName: r.dll ModVer: 2.81.47281.0 Offset: 000c1939 Anybody know a version of R, that is not making such errors? I am waiting for your assistance as soon as possible. Thanks you by your atention. Here datails of windows and an installed R: --- Nombre de host:TOSHIBA-USER Nombre del sistema operativo: Microsoft Windows XP Professional Versi¢n del sistema operativo: 5.1.2600 Service Pack 3 Compilaci¢n 2600 Fabricante del sistema operativo: Microsoft Corporation Configuraci¢n del sistema operativo: Estaci¢n de trabajo independiente Tipo de compilaci¢n del sistema operativo: Multiprocessor Free Propiedad de: Bernardo Organizaci¢n registrada: Id. del producto: 76460-OEM-0011903-00111 Fecha de instalaci¢n original: 25/09/2006, 08:06:26 p.m. Tiempo de actividad del sistema: 0 d¡as, 0 horas, 58 minutos, 26 segundos Fabricante del sistema:TOSHIBA Modelo el sistema: TECRA A7 Tipo de sistema: X86-based PC Procesador(es):1 Procesadores instalados. [01]: x86 Family 6 Model 14 Stepping 8 GenuineIntel ~1829 Mhz Versi¢n del BIOS: TOSINV - 604 Directorio de Windows: C:\WINDOWS Directorio de sistema: C:\WINDOWS\system32 Dispositivo de inicio: \Device\HarddiskVolume1 Configuraci¢n regional del sistema:0c0a Idioma:040A Zona horaria: N/D Cantidad total de memoria f¡sica: 1,022 MB Memoria f¡sica disponible: 396 MB Memoria virtual: tama¤o m ximo:2,048 MB Memoria virtual: disponible: 2,006 MB - release of R _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 8.1 year 2008 month 12 day22 svn rev47281 language R version.string R version 2.8.1 (2008-12-22) -- Bernardo. University of Concepción. Chile. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] arima function fix the coefficients
Dear all, How can I fix the all coefficients of ar and ma, except for the sigma? Hoping this helps, Bernardo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] indexed expression
Hello expeRts, I need generate symbolize the autocovariances matrix of a Gaussian ARMA(1,1), for derivate it and evaluate. I try this codes, but whitout sucess vacv<-NULL vacv[1]<-1-2*phi*theta-theta^2 vacv[2]<-(1-phi*theta)*(phi-theta) vacv[3:n]<-acv[2]*(phi^(1:(n-2))) facv<-list() for(i in 1:2) facv[[i]]<-deriv(y~vacv[i],c("phi","theta"),function(phi,theta){}) Erro en deriv.formula(y ~ vacv[i], c("phi", "theta"), function(phi, theta) { : Función '`[`' no está en la tabla de derivadas dfg<-for(n in 1:2) as.formula(sprintf("y~(1 - phi * theta) * (phi - theta)*phi^ %d",n)) dfg y ~ (1 - phi * theta) * (phi - theta) * phi^2 deriv(dfg[[1]],phi) Erro en deriv.default(expr, namevec, function.arg, tag, hessian) : nombres de variable inválidos Give me a help, please. Bernardo. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error en nlm(logdgenexpn, p = c(vmomest[[1]], vmomest[[2]]), x = x.genexp, : valor no finito provisto por 'nlm'
Dear useRs, I am analysing the behaviour of MLE for the two parameters of a kind of exponential distribution, leaving as initial values the estimators moments produced by the variation coefficient. I do using simulations, giving them an accountant, r. But running my codes remains a problem with the nlm function. To review details wearing On one of the lines put status cond04<-is.finite(mle.nlm$minimum) { . An Introduction to the Interactive Debugging Tools in R, Roger D. Peng, UCLA Department of Statistics, August 28, 2002 The error message is delivered: Error en nlm(logdgenexpn, p = c(vmomest[[1]], vmomest[[2]]), x = x.genexp, : valor no finito provisto por 'nlm' Además: Hubo 50 o más avisos (use warnings() para ver los primeros 50) One possibility is to re-generate the data set that produces such error, but not know how to do it. Someone knows how to keep in an object the parameters of the generator which produces such shows. l can send codes for details. Thank you for your attention. Bernardo. University of Concepción __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] messages from mle function
Dears useRs, I am using the mle function but this gives me the follow erros that I don't understand. Perhaps there is someone that can help me. thank you for you atention. Bernardo. > erizo <- read.csv("Datos_Stokes_1.csv", header = TRUE) > head(erizo) EDAD TALLA 10 7.7 21 14.5 31 16.9 41 13.2 51 24.4 61 22.5 > TAN <- function(edad,f,c,a,d) (1/sqrt(f))*log(abs(2*f*(edad-c)+ > 2*sqrt((f^2)*((edad-c)^2)+f*a)))+d > loglike = function(f,c,a,d) { + edad <- erizo$EDAD + LT<- erizo$TALLA + N <- length(edad) + sigma <- sum((LT - TAN(edad,f,c,a,d))^2) / N + logl <- (N/2)*log(sigma) + (sum((LT - TAN(edad,f,c,a,d))^2) / (2*sigma)) + } > ini.pars <- list(f=5.91e-05,c=-0.41732,a=0.009661,d=846.7179) > library(stats4) > erizo.mle <- mle(start= ini.pars, minuslogl = loglike, method="Nelder-Mead", > control = list(maxit=1500, trace=TRUE)) Nelder-Mead direct search function minimizer function value for initial parameters = 1159.477620 Scaled convergence tolerance is 1.72776e-05 Stepsize computed as 84.671790 BUILD 5 3165.307359 1159.477620 . . . HI-REDUCTION 303 1158.377359 1158.377314 LO-REDUCTION 305 1158.377339 1158.377303 LO-REDUCTION 307 1158.377321 1158.377303 Exiting from Nelder Mead minimizer 309 function evaluations used Error en optim(start, f, method = method, hessian = TRUE, ...) : non-finite finite-difference value [1] Además: Hubo 50 o más avisos (use warnings() para ver los primeros 50) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] matrix to gal object
useR's I need transform the matrix wdat [,1] [,2] [,3] [,4] [,5] [,6] [1,]010110 [2,]100110 [3,]000011 [4,]110010 [5,]111100 [6,]001000 to gal object. How I do with spdep? Thanks in advance for the help. Bernardo. University of Concepció. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] rgdal for R.2.4.0?
Hi, Know anyone where to find the package rgdal for R.2.4.0? I would appreciate advice very much. Best wishes, Bernardo Lagos Department of Statistics University of Concepción __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] the use of the .C function
Hi all, here others doubts, when load and running the function void gdot(double *x,double *y,int *n,double *output){ int i; *output=0; for (i=0;i<*n;i++){ *output+=x[i]*y[i]; } } as following /examplesC$ R CMD SHLIB xby.c gcc -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include -fpic -g -O2 -c xby.c -o xby.o gcc -std=gnu99 -shared -o xby.so xby.o -L/usr/lib/R/lib -lR /examplesC$ R >x<-c(1,4,6,2) >y<-c(3,2.4,1,9) > dyn.load("xby.so") >product<-.C("gdot",myx=as.double(x),myy=as.double(y),myn=as.integer(NROW(x)),myoutput=numeric()) *** caught segfault *** address (nil), cause 'memory not mapped' Traceback: 1: .C("gdot", myx = as.double(x), myy = as.double(y), myn = as.integer(NROW(x)), myoutput = numeric()) Possible actions: 1: abort (with core dump) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection: Selection: Selection: Can anybody answerme that happening with this Traceback? Thanking you in advance, Bernardo Lagos A. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] the use of the .C function
Dear All, could someone please shed some light on the use of the .C or .Fortran function: I am trying load and running on R the following function // psi.cpp -- psi function for real arguments. // Algorithms and coefficient values from "Computation of Special // Functions", Zhang and Jin, John Wiley and Sons, 1996. // // (C) 2003, C. Bond. All rights reserved. // // Returns psi function for real argument 'x'. // NOTE: Returns 1e308 for argument 0 or a negative integer. // #include // or ? #include #define el 0.5772156649015329 double psi(double x) { double s,ps,xa,x2; int n,k; static double a[] = { -0.8e-01, 0.8e-02, -0.39682539682539683e-02, 0.41667e-02, -0.75757575757575758e-02, 0.21092796092796093e-01, -0.8e-01, 0.4432598039215686}; xa = fabs(x); s = 0.0; if ((x == (int)x) && (x <= 0.0)) { ps = 1e308; return ps; } if (xa == (int)xa) { n = xa; for (k=1;kdigamma(-0.9) [1] -9.312644 OK! But when > dyn.load("psi.so") > out<-.C("psi", as.double(-0.9)) Erro en .C("psi", as.double(-0.9)) : C symbol name "psi" not in load table > out Error: objeto "out" no encontrado More information on OS: > version _ platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu status major 2 minor 4.1 year 2006 month 12 day18 svn rev40228 language R version.string R version 2.4.1 (2006-12-18) Many thanks for any insight or comments. Bernardo Lagos A. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] psi using .C with R
Hi All, Anybody know as run the function psi on http://www.alglib.net/translator/dl/specialfunctions.psi.csharp.zip or http://www.alglib.net/translator/dl/specialfunctions.psi.cpp.zip using .C or .Fortran ? Thank for your attention. Bernardo. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] .C("myHadamaProduct", xx, yy, nr, nc, out=as.double(rep(0.0, n)))
Konw anybody as run the function psi on >> >> >> http://www.alglib.net/translator/dl/specialfunctions.psi.csharp.zip >> >> or >> >> http://www.alglib.net/translator/dl/specialfunctions.psi.cpp.zip >> >> using .C with R. >> ? >> >> Thank for your attention. >> >> Bernardo. >> >> >>> If anybody has an idea what is causing these problems I would be very >>> much appreciate your help. >>> >>> I am running the exampls on >>> >>> http://www.stat.ubc.ca/~webmaste/howto/statsoftware/splusR.html#callFortran >>> >>> But >>> >>> res<-.C("myHadamaProduct", xx, yy, nr, nc, out=as.double(rep(0.0, n))) >>> Erro en as.double(rep(0, n)) : objeto "n" no encontrado >>> >>> >>> n=2 or n=5? >>> >>> Tanks verymuch. >>> >>> Bernardo. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] .C("myHadamaProduct", xx, yy, nr, nc, out=as.double(rep(0.0, n)))
> > Konw anybody as run the function psi on > > > http://www.alglib.net/translator/dl/specialfunctions.psi.csharp.zip > > or > > http://www.alglib.net/translator/dl/specialfunctions.psi.cpp.zip > > using .C with R. > ? > > Thank for your attention. > > Bernardo. > > >> If anybody has an idea what is causing these problems I would be very >> much appreciate your help. >> >> I am running the exampls on >> >> http://www.stat.ubc.ca/~webmaste/howto/statsoftware/splusR.html#callFortran >> >> But >> >> res<-.C("myHadamaProduct", xx, yy, nr, nc, out=as.double(rep(0.0, n))) >> Erro en as.double(rep(0, n)) : objeto "n" no encontrado >> >> >> n=2 or n=5? >> >> Tanks verymuch. >> >> Bernardo. >> > > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.