Re: [Rd] Rmpi on CentOS (64bit)
On Wed, 03-Mar-2010 at 01:57PM -0600, Dirk Eddelbuettel wrote: [...] | You could try to suppress the probe for IB which we did (in the older 1.2.* | series of OpenMPI) via | |# Disable the use of InfiniBand |# btl = ^openib |btl = ^openib | | in /etc/openmpi/openmpi-mca-params.conf CentOS has it in a completely different place. I tried that suggestion, but to no avail. I looked into ... the availability of the interfaces in the dat.conf file which the error message mentioned. $ locate dat.conf /etc/ofed/dat.conf /etc/ofed/compat-dapl/dat.conf /usr/share/man/man5/dat.conf.5.gz (No such files appear in Fedora 11 and there seems to be no ill-effects). Are we to assume that it's the second of those that is related to the message? $ cat /etc/ofed/compat-dapl/dat.conf OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 ib0 0 OpenIB-cma-1 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 ib1 0 OpenIB-mthca0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 mthca0 1 OpenIB-mthca0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 mthca0 2 OpenIB-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 mlx4_0 1 OpenIB-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 mlx4_0 2 OpenIB-ipath0-1 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 ipath0 1 OpenIB-ipath0-2 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 ipath0 2 OpenIB-ehca0-2 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 ehca0 1 OpenIB-iwarp u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 eth2 0 $ cat /etc/ofed/dat.conf ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 ib0 0 ofa-v2-ib1 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 ib1 0 ofa-v2-mthca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 mthca0 1 ofa-v2-mthca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 mthca0 2 ofa-v2-mlx4_0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 mlx4_0 1 ofa-v2-mlx4_0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 mlx4_0 2 ofa-v2-ipath0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 ipath0 1 ofa-v2-ipath0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 ipath0 2 ofa-v2-ehca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 ehca0 1 ofa-v2-iwarp u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 eth2 0 $ Does that give anyone any clues as to what could be going on the message (which went like this)? librdmacm: couldn't read ABI version. librdmacm: assuming: 4 libibverbs: Fatal: couldn't read uverbs ABI version. CMA: unable to open /dev/infiniband/rdma_cm -- WARNING: Failed to open OpenIB-cma [DAT_INTERNAL_ERROR:]. This may be a real error or it may be an invalid entry in the uDAPL Registry which is contained in the dat.conf file. Contact your local System Administrator to confirm the availability of the interfaces in the dat.conf file. -- Could there be a modification to Dirk's suggestion that might deal with it? (I'm making a last-ditch attempt to avoid using Fedora.) It's hard to find anything much about CentOS and MPI -- or at least what people did to get it working. I found tales of people having difficulties with Fedora that I didn't have. I'm not much wiser than I began. best -- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ___Patrick Connolly {~._.~} Great minds discuss ideas _( Y )_ Average minds discuss events (:_~*~_:) Small minds discuss people (_)-(_) . Eleanor Roosevelt ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Suggestion to add crantastic to resources section on posting guide
Under the further resources section I'd like to suggest the following addition : * http://crantastic.org/ lists popular packages according to other users votes. Consider briefly reviewing the top 30 packages before posting to r-help since someone may have already released a package that solves your problem. Thats just a straw man idea so I hope there will be answer, or discussion, either way. Matthew __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] shash in unique.c
I was hoping for a 'yes', 'no', 'maybe' or 'bad idea because ...'. No response resulted in a retry() after a Sys.sleep(10 days). If its a yes or maybe then I could proceed to try it, test it, and present the test results and timings to you along with the patch. It would be on 32bit Ubuntu first, and I would need to either buy, rent time on, or borrow a 64bit machine to be able to then test there, owing to the nature of the suggestion. If its no, bad idea because... or we were already working on it, or better, then I won't spend any more time on it. Matthew Matthew Dowle mdo...@mdowle.plus.com wrote in message news:hlu4qh$l7...@dough.gmane.org... Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? shash would look like a slightly modified version of ihash like this : static int shash(SEXP x, int indx, HashData *d) { if (STRING_ELT(x,indx) == NA_STRING) return 0; return scatter((unsigned int) (STRING_ELT(x,indx), d); } rather than its current form which appears to hash the string it points to : static int shash(SEXP x, int indx, HashData *d) { unsigned int k; const char *p; if(d-useUTF8) p = translateCharUTF8(STRING_ELT(x, indx)); else p = translateChar(STRING_ELT(x, indx)); k = 0; while (*p++) k = 11 * k + *p; /* was 8 but 11 isn't a power of 2 */ return scatter(k, d); } Looking at sequal, below, and reading its comments, if the pointers are equal it doesn't look at the strings they point to, which lead to the question above. static int sequal(SEXP x, int i, SEXP y, int j) { if (i 0 || j 0) return 0; /* Two strings which have the same address must be the same, so avoid looking at the contents */ if (STRING_ELT(x, i) == STRING_ELT(y, j)) return 1; /* Then if either is NA the other cannot be */ /* Once all CHARSXPs are cached, Seql will handle this */ if (STRING_ELT(x, i) == NA_STRING || STRING_ELT(y, j) == NA_STRING) return 0; return Seql(STRING_ELT(x, i), STRING_ELT(y, j)); } Matthew __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] shash in unique.c
Matthew Dowle wrote: I was hoping for a 'yes', 'no', 'maybe' or 'bad idea because ...'. No response resulted in a retry() after a Sys.sleep(10 days). If its a yes or maybe then I could proceed to try it, test it, and present the test results and timings to you along with the patch. It would be on 32bit Ubuntu first, and I would need to either buy, rent time on, or borrow a 64bit machine to be able to then test there, owing to the nature of the suggestion. If its no, bad idea because... or we were already working on it, or better, then I won't spend any more time on it. Matthew Matthew Dowle mdo...@mdowle.plus.com wrote in message news:hlu4qh$l7...@dough.gmane.org... Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? Two negative but probably not fatal issues: Pointers and ints are not always the same size. In Win64, ints are 32 bits, pointers are 64 bits. (Can we be sure there is some integer type the same size as a pointer? I don't know, ask a C expert.) We might want to save the hash to disk. On restore, the pointer based hash would be all wrong. (I don't know if we actually do ever save a hash to disk. ) Duncan Murdoch shash would look like a slightly modified version of ihash like this : static int shash(SEXP x, int indx, HashData *d) { if (STRING_ELT(x,indx) == NA_STRING) return 0; return scatter((unsigned int) (STRING_ELT(x,indx), d); } rather than its current form which appears to hash the string it points to : static int shash(SEXP x, int indx, HashData *d) { unsigned int k; const char *p; if(d-useUTF8) p = translateCharUTF8(STRING_ELT(x, indx)); else p = translateChar(STRING_ELT(x, indx)); k = 0; while (*p++) k = 11 * k + *p; /* was 8 but 11 isn't a power of 2 */ return scatter(k, d); } Looking at sequal, below, and reading its comments, if the pointers are equal it doesn't look at the strings they point to, which lead to the question above. static int sequal(SEXP x, int i, SEXP y, int j) { if (i 0 || j 0) return 0; /* Two strings which have the same address must be the same, so avoid looking at the contents */ if (STRING_ELT(x, i) == STRING_ELT(y, j)) return 1; /* Then if either is NA the other cannot be */ /* Once all CHARSXPs are cached, Seql will handle this */ if (STRING_ELT(x, i) == NA_STRING || STRING_ELT(y, j) == NA_STRING) return 0; return Seql(STRING_ELT(x, i), STRING_ELT(y, j)); } Matthew __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Suggestion to add crantastic to resources section on posting guide
I don't think we should be expanding the posting guide. Its already so long that no one reads it. We should be thinking of ways to cut it down to a smaller size instead. On Fri, Mar 5, 2010 at 5:52 AM, Matthew Dowle mdo...@mdowle.plus.com wrote: Under the further resources section I'd like to suggest the following addition : * http://crantastic.org/ lists popular packages according to other users votes. Consider briefly reviewing the top 30 packages before posting to r-help since someone may have already released a package that solves your problem. Thats just a straw man idea so I hope there will be answer, or discussion, either way. Matthew __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] shash in unique.c
Thanks a lot. Quick and brief responses below... Duncan Murdoch murd...@stats.uwo.ca wrote in message news:4b90f134.6070...@stats.uwo.ca... Matthew Dowle wrote: I was hoping for a 'yes', 'no', 'maybe' or 'bad idea because ...'. No response resulted in a retry() after a Sys.sleep(10 days). If its a yes or maybe then I could proceed to try it, test it, and present the test results and timings to you along with the patch. It would be on 32bit Ubuntu first, and I would need to either buy, rent time on, or borrow a 64bit machine to be able to then test there, owing to the nature of the suggestion. If its no, bad idea because... or we were already working on it, or better, then I won't spend any more time on it. Matthew Matthew Dowle mdo...@mdowle.plus.com wrote in message news:hlu4qh$l7...@dough.gmane.org... Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? Two negative but probably not fatal issues: Pointers and ints are not always the same size. In Win64, ints are 32 bits, pointers are 64 bits. (Can we be sure there is some integer type the same size as a pointer? I don't know, ask a C expert.) No we can't be sure. But we could test at runtime, and if the assumption wasn't true, then revert to the existing method. We might want to save the hash to disk. On restore, the pointer based hash would be all wrong. (I don't know if we actually do ever save a hash to disk. ) The hash table in unique.c appears to be a temporary private hash, different to the global R_StringHash. Its private hash appears to be used only while the call to unique runs, then free'd. Thats my understanding anyway. The suggestion is not to alter the global R_StringHash in any way at all, which is the one that might be saved to disk now or in the future. Duncan Murdoch shash would look like a slightly modified version of ihash like this : static int shash(SEXP x, int indx, HashData *d) { if (STRING_ELT(x,indx) == NA_STRING) return 0; return scatter((unsigned int) (STRING_ELT(x,indx), d); } rather than its current form which appears to hash the string it points to : static int shash(SEXP x, int indx, HashData *d) { unsigned int k; const char *p; if(d-useUTF8) p = translateCharUTF8(STRING_ELT(x, indx)); else p = translateChar(STRING_ELT(x, indx)); k = 0; while (*p++) k = 11 * k + *p; /* was 8 but 11 isn't a power of 2 */ return scatter(k, d); } Looking at sequal, below, and reading its comments, if the pointers are equal it doesn't look at the strings they point to, which lead to the question above. static int sequal(SEXP x, int i, SEXP y, int j) { if (i 0 || j 0) return 0; /* Two strings which have the same address must be the same, so avoid looking at the contents */ if (STRING_ELT(x, i) == STRING_ELT(y, j)) return 1; /* Then if either is NA the other cannot be */ /* Once all CHARSXPs are cached, Seql will handle this */ if (STRING_ELT(x, i) == NA_STRING || STRING_ELT(y, j) == NA_STRING) return 0; return Seql(STRING_ELT(x, i), STRING_ELT(y, j)); } Matthew __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Suggestion to add crantastic to resources section onposting guide
That appears to be an epistemic error. Some people, and I would agree it seems like an increasing number of people, clearly don't read the posting guide. However, it is impossible for anyone to know how many people do read it, do thoroughly read it and, therefore, don't ever need to post to r-help. Those people would be missing from the statistical sample of people who do post. In fact it would be very surprising indeed, assuming it is true that R is getting more popular, to not see the numbers of non-compliant posters increase. I dont believe in basing decisions upon poorly applied statistics. Especially ones that go from correlation to causation so casually. Gabor Grothendieck ggrothendi...@gmail.com wrote in message news:971536df1003050433i7f104bd4l1e1421fab0d3...@mail.gmail.com... I don't think we should be expanding the posting guide. Its already so long that no one reads it. We should be thinking of ways to cut it down to a smaller size instead. On Fri, Mar 5, 2010 at 5:52 AM, Matthew Dowle mdo...@mdowle.plus.com wrote: Under the further resources section I'd like to suggest the following addition : * http://crantastic.org/ lists popular packages according to other users votes. Consider briefly reviewing the top 30 packages before posting to r-help since someone may have already released a package that solves your problem. Thats just a straw man idea so I hope there will be answer, or discussion, either way. Matthew __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Changing the Prompt for browser()
Is there a way that I can change the prompt for within a browser() call. I often use use code like with(obj1,browser()) Browse[1] Is there a way that I can set it so that I can get something like with(obj1,browser(prompt=obj1)) obj1[1] I know that prompt is not a valid option for browser, but it would be nice if it were. There is an option('prompt) but that does not affect the prompt for browser. Can I change this and how? Thanks, Andrew [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Defining a method in two packages
The coxme package has a ranef() method, as does lme4. I'm having trouble getting them to play together, as shown below. (The particular model in the example isn't defensible, but uses a standard data set.) The problem is that most of the time only one of lme4 or coxme will be loaded, so each needs to define the basic ranef function as well as a method for it. But when loaded together the last one wins. The coxme object is an S3 class BTW. (Suggestions to convert it to S4 will not be well recieved -- but that's a different and unnecessary thread.) Odds are that this has a simple solution which I have missed. Terry Therneau tmt935% R --vanilla R version 2.10.0 (2009-10-26) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. library(coxme) Loading required package: survival Loading required package: splines Loading required package: bdsmatrix fit - coxme(Surv(time, status) ~ age + (1|ph.ecog), lung) ranef(fit) $ph.ecog Intercept 0.1592346 library(lme4) Loading required package: Matrix Loading required package: lattice Attaching package: 'lme4' The following object(s) are masked from package:coxme : fixef, ranef ranef(fit) Error in function (classes, fdef, mtable) : unable to find an inherited method for function ranef, for signature coxme q() __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] CRAN nearly down?
Is CRAN having trouble or is it just me? (The web interface is very slow and install.packages() is timing out and giving me service not available). Paul La version française suit le texte anglais. This email may contain privileged and/or confidential information, and the Bank of Canada does not waive any related rights. Any distribution, use, or copying of this email or the information it contains by other than the intended recipient is unauthorized. If you received this email in error please delete it immediately from your system and notify the sender promptly by email that you have done so. Le présent courriel peut contenir de l'information privilégiée ou confidentielle. La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute diffusion, utilisation ou copie de ce courriel ou des renseignements qu'il contient par une personne autre que le ou les destinataires désignés est interdite. Si vous recevez ce courriel par erreur, veuillez le supprimer immédiatement et envoyer sans délai à l'expéditeur un message électronique pour l'aviser que vous avez éliminé de votre ordinateur toute copie du courriel reçu. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] CRAN nearly down?
On Mar 5, 2010, at 12:40 , Paul Gilbert wrote: Is CRAN having trouble or is it just me? CRAN consists of 70 servers (hence the N in the name) so the answer is definitely it's you ;). Try using a different mirror - the ones I tried are all very snappy so if that doesn't help it's your connection. Cheers, Simon (The web interface is very slow and install.packages() is timing out and giving me service not available). Paul = = = = = = = = = = = = = = == La version française suit le texte anglais. This email may contain privileged and/or confidential information, and the Bank of Canada does not waive any related rights. Any distribution, use, or copying of this email or the information it contains by other than the intended recipient is unauthorized. If you received this email in error please delete it immediately from your system and notify the sender promptly by email that you have done so. Le présent courriel peut contenir de l'information privilégiée ou confidentielle. La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute diffusion, utilisation ou copie de ce courriel ou des renseignements qu'il contient par une personne autre que le ou les destinataires désignés est interdite. Si vous recevez ce courriel par erreur, veuillez le supprimer immédiatement et envoyer sans délai à l'expéditeur un message électronique pour l'aviser que vous avez éliminé de votre ordinateur toute copie du courriel reçu. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] shash in unique.c
On 3/5/10 4:40 AM, Matthew Dowle wrote: Thanks a lot. Quick and brief responses below... Duncan Murdochmurd...@stats.uwo.ca wrote in message news:4b90f134.6070...@stats.uwo.ca... Matthew Dowle wrote: I was hoping for a 'yes', 'no', 'maybe' or 'bad idea because ...'. No response resulted in a retry() after a Sys.sleep(10 days). If its a yes or maybe then I could proceed to try it, test it, and present the test results and timings to you along with the patch. It would be on 32bit Ubuntu first, and I would need to either buy, rent time on, or borrow a 64bit machine to be able to then test there, owing to the nature of the suggestion. If its no, bad idea because... or we were already working on it, or better, then I won't spend any more time on it. Matthew Matthew Dowlemdo...@mdowle.plus.com wrote in message news:hlu4qh$l7...@dough.gmane.org... Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? Two negative but probably not fatal issues: Pointers and ints are not always the same size. In Win64, ints are 32 bits, pointers are 64 bits. (Can we be sure there is some integer type the same size as a pointer? I don't know, ask a C expert.) No we can't be sure. But we could test at runtime, and if the assumption wasn't true, then revert to the existing method. I think the idea is, on the whole, a reasonable one and would be inclined to apply a patch if it demonstrated some measurable performance improvement. For the 32bit v 64bit issue, I think we could detect and in the 64bit case take something like: ((int)p) ^ ((int)(p 32)) We might want to save the hash to disk. On restore, the pointer based hash would be all wrong. (I don't know if we actually do ever save a hash to disk. ) The hash table in unique.c appears to be a temporary private hash, different to the global R_StringHash. Its private hash appears to be used only while the call to unique runs, then free'd. Thats my understanding anyway. The suggestion is not to alter the global R_StringHash in any way at all, which is the one that might be saved to disk now or in the future. I agree with your reading: this is a temporary hash table and there would be little reason to want to save it (it is not saved now). + seth -- Seth Falcon | @sfalcon | http://userprimary.net/user __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Changing the Prompt for browser()
On Fri, 5 Mar 2010, Andrew Redd wrote: Is there a way that I can change the prompt for within a browser() call. I often use use code like with(obj1,browser()) Browse[1] Is there a way that I can set it so that I can get something like with(obj1,browser(prompt=obj1)) obj1[1] I know that prompt is not a valid option for browser, but it would be nice if it were. There is an option('prompt) but that does not affect the prompt for browser. Can I change this and how? Only by changing the sources. The prompt is hard-coded in src/main/main.c. Thanks, Andrew [[alternative HTML version deleted]] Please respect the request in the posting guide not to send HTML. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Defining a method in two packages
Sorry for one more email, but here is a more concise and pertinent ranef example: # Allow S4 methods to find S3 asreml objects setOldClass(asreml) if(!isGeneric(ranef)){ setGeneric(ranef, function(object, ...) standardGeneric(ranef)) } ranef.asreml - function(obj){ effects - obj$coefficients$random class(effects) - c(ranef.asreml,class(effects)) return(effects) } print.ranef.asreml - function(x, ...){ print.default(x) } Kevin On Fri, Mar 5, 2010 at 10:47 AM, Terry Therneau thern...@mayo.edu wrote: The coxme package has a ranef() method, as does lme4. I'm having trouble getting them to play together, as shown below. (The particular model in the example isn't defensible, but uses a standard data set.) The problem is that most of the time only one of lme4 or coxme will be loaded, so each needs to define the basic ranef function as well as a method for it. But when loaded together the last one wins. The coxme object is an S3 class BTW. (Suggestions to convert it to S4 will not be well recieved -- but that's a different and unnecessary thread.) Odds are that this has a simple solution which I have missed. Terry Therneau tmt935% R --vanilla R version 2.10.0 (2009-10-26) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. library(coxme) Loading required package: survival Loading required package: splines Loading required package: bdsmatrix fit - coxme(Surv(time, status) ~ age + (1|ph.ecog), lung) ranef(fit) $ph.ecog Intercept 0.1592346 library(lme4) Loading required package: Matrix Loading required package: lattice Attaching package: 'lme4' The following object(s) are masked from package:coxme : fixef, ranef ranef(fit) Error in function (classes, fdef, mtable) : unable to find an inherited method for function ranef, for signature coxme q() __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Kevin Wright [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Improved Nelder-Mead algorithm - a potential replacement for optim's Nelder-Mead
Hi, I have written an R translation of C.T. Kelley's Matlab version of the Nelder-Mead algorithm. This algorithm is discussed in detail in his book Iterative methods for optimization (SIAM 1999, Chapter 8). I have tested this relatively extensively on a number of smooth and non-smooth problems. It performs well, in general, and it almost always outperforms optim's implementation of Nelder-Mead. I have obtained written permissions from both SIAM (publishers of Kelley's text) and from C.T. Kelley himself to make this publicly available in R. I have been planning on releasing this function either as a separate package or as one of the algorithms in a package containing derivative-free methods. However, it was recently suggested to me by Soren Hosgaard that a better option would be to incorporate this as part of `optim' itself, either replacing existing Nelder-Mead or as another `method' in optim, so that it will be more widely used. Would anyone from the R-core be interested in incorporting this into optim? It should be mentioned that my code is entirely written in R. Therefore, speed gains could be achieved if translated into C (I am not proficient in C). Best, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu ---BeginMessage--- Dear Ravi, A possible alternative to releasing this as an R-package (there are already 2200+ packages now) could be to approach the R-core (specifically I am thinking about Martin Maechler) to suggest that your contribution would be included as an option (possibly even the default) in optim(). Best regards Søren Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.org] P#229; vegne af Ravi Varadhan [rvarad...@jhmi.edu] Sendt: 5. marts 2010 16:21 Til: stephen sefick Cc: r-h...@r-project.org Emne: [R] Improved Nelder-Mead algorithm and Matlab's fminsearch. Was: Hi The `fminsearch' in Matlab uses a version of the Nelder-Mead simplex search algorithm, which is a derivative-free search technique. The Nelder-Mead is also the default algorithm in optim(). Therefore, you can simply call optim() to get your job done. However, I would like to mentiion that the Nelder-Mead implementation in optim() is not the best, and I have had others (who use Matlab) tell me that `fminsearch' generally performs better than optim's Nelder-Mead. I have written an improved version of Nelder-Mead that performs better than optim's Nelder-Mead. Iwill soon release it as a package (I have been saying this for several months now!), but I can send it to you if you are interested. Hope this helps, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: stephen sefick ssef...@gmail.com Date: Thursday, March 4, 2010 4:02 pm Subject: Re: [R] Hi To: hussain abu-saaq hussain...@hotmail.com Cc: r-h...@r-project.org I would help, but I don't know matlab. Stephen On Thu, Mar 4, 2010 at 2:50 PM, hussain abu-saaq hussain...@hotmail.com wrote: How Can I write this this matlab code in R: options=optimset('TolFun',1e-9,'TolX',1e-9,'MaxIter',1e8,'MaxFunEvals',1e8); c=c/2; [alpha, delta, epsilon, nofcup] = ustrs(set_date,mat_date); y = fminsearch('pbond',.15,options,p,c,nofcup,delta/epsilon); y = 200*y; Note pbond is a function in Matlab I already wrote in R ustrs is a function in Matlab I already convert into r Thank you HI [[alternative HTML version deleted]] __ r-h...@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis __ r-h...@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ r-h...@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.---End Message---
[Rd] unable to compile Recommended packages
Hi folks, I'm having a problem with installing R on Solaris. Has anyone seen a similar issue? I don't find any hits on the search engines. Thanks. Environment: SunOS 5.10 Generic_118822-25 sun4u sparc SUNW,Sun-Fire-280R During the installation/compilation of R-2.10.1 I get the following error: begin installing recommended package boot ERROR: cannot extract package from 'boot.tgz' *** Error code 1 The following command caused the error: MAKE=make R_LIBS= ../../../bin/R CMD INSTALL --no-lock -l ../../../library boot.tgz boot.ts.out 21 || (cat boot.ts.out exit 1) make: Fatal error: Command failed for target `boot.ts' Current working directory /home/ireview/R-2.10.1/src/library/Recommended *** Error code 1 The following command caused the error: make stamp-recommended make: Fatal error: Command failed for target `recommended-packages' Current working directory /home/ireview/R-2.10.1/src/library/Recommended *** Error code 1 The following command caused the error: (cd src/library/Recommended make) make: Fatal error: Command failed for target `stamp-recommended' -Alex // // Alex Bryant // Software Developer // Integrated Clinical Systems, Inc. // 908-996-7208 Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] for help on building a R package with several R function and a bunch of c, c++
Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. These R function here are independent of c++ code. I prefer to define one R function to call this c++ program (main function). I know how to build R package with just R function, but I don't know how to handle those c++ c code after I copied those code in ./src, I am reading manual Writing R Extensions , but I did n't catch the key point . Do you know any easy way to do it? , Thank you in advance! Alex __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] references to (1) R source code in svn repo within .Rd file and (2) to C source code in comments in R code using .Internal() /.Primitive()
Hi R-devels, recently I wanted to quickly look up a C implementation in R-Core code in the official subversion repository; more specifically the code was called from R by means of the .Internal() interface. And: yes, I did read Uwe Ligges' article in R News, R Help Desk: Accessing the sources. R News, 6(4):43-45, October 2006 In the end I succeeded, using grep and the like to search the sources in R_HOME/src, but I found it rather painful ... (in particular, if R function foo() is not implemented in file foo.R and/or the corresponding C code is not in file ../src/foo.c ) So here my little two wishes: (1) references to R code in the .Rd file As all the R source code is accessible through https://svn.r-project.org/R anyway, why not link to it in .Rd files? What about a new optional markup command \URLtoSource with one argument (the URL); e.g. inserting to file R_HOME/src/library/base/man/sample.Rd the following line: \URLtoSource{https://svn.r-project.org/R/% linebreak branches/R-2-xx-branch/src/library/base/sample.R} (OK, yet another markup command to be rendered by the new Rd parser...) Advantage: Following this link in a browser would then also display comments in R source, without the caveats mentioned in Uwe's article. Also no need to download and unpack all the source tar-ball. Disadvantage: Presumably more traffic on svn.r-project.org ... I think (1) should be feasible automatically (at least to a large extent). (2) references to C code interfaced to through .Internal() / .Primitive() as comments in R code Could you think of an automatic way of inserting references into the R source containing the call to .Internal() / .Primitive() --- some (standardized) comment with a link referring to the respective C source file, or, even better, to the corresponding C function(s), possibly again an URL to the svn repository ? Example: code to sample.R # File src/library/base/R/sample.R # Part of the R package, http://www.R-project.org # --- [snip] --- # http://www.r-project.org/Licenses/ sample - function(x, size, replace=FALSE, prob=NULL) { if(length(x) == 1L is.numeric(x) x = 1) { if(missing(size)) size - x .Internal(sample(x, size, replace, prob)) } else { if(missing(size)) size - length(x) x[.Internal(sample(length(x), size, replace, prob))] # ###new proposed comment: # ### C code interfaced to is implemented in ### R_HOME/src/main/random.c ### ### or: even nicer ### ### corresponding C code may be inspected in ### https://svn.r-project.org/R/branches/% linebreak ### R-2-xx-branch/src/main/random.c ### ### and, optionally something like ### ### as functions ProbSampleReplace(), ProbSampleNoReplace(), ### SampleReplace(), SampleNoReplace(), . ### maybe more # ###end.new comment # } } --- snip --- (The actual list of C functions would not be urgent at all; finding the right source file already would mean the big step) As indicated in Uwe's article, one start to automatize this, I guess, would be to build up a table with columns R function name : R-source file : C-source file from the entries in R_HOME/src/main/names.c These two enhancements would help outsiders very much to spot the corresponding code (and not the least to learn from the Giants). --- just a wish for enhancement though, certainly not of top priority. Any comments are welcome, Best, Peter __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] for help on building a R package with several R function and a bunch of c, c++
On 5 March 2010 at 13:15, alex46...@yahoo.com wrote: | Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. These R function here are independent of c++ code. I prefer to define one R function to call this c++ program (main function). | | I know how to build R package with just R function, but I don't know how to handle those c++ c code after I copied those code in ./src, I am reading manual Writing R Extensions , but I did n't catch the key point . Do you know any easy way to do it? , When you asked _that exact same question_ this morning on r-help, you got the following answer: From: Whit Armstrong armstrong.w...@gmail.com To: alex46...@yahoo.com Cc: r-h...@r-project.org Subject: Re: [R] for help on building a R package with several R function and a bunch of c, c++ Date: Fri, 5 Mar 2010 10:33:54 -0500 Pick up Rcpp, make your life easier. http://dirk.eddelbuettel.com/code/rcpp.html -Whit On Fri, Mar 5, 2010 at 9:19 AM, alex46...@yahoo.com wrote: Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. R function here are independent c++ code. I prefer to define one R function to call this c++ program. Do you know any easy way to do it? I am reading manual Writing R Extensions, I didn't catch the key point. I know how to build R package with just R function, If I put all c++ code and makefile in /src...what I need do? Thank you in advance! Alex Now, can you let us know a) what part of the answer was unclear to you, and b) what made you think you needed to repost _the identical question_ here | Thank you in advance! You're welcome. Dirk | Alex | | __ | R-devel@r-project.org mailing list | https://stat.ethz.ch/mailman/listinfo/r-devel -- Registration is open for the 2nd International conference R / Finance 2010 See http://www.RinFinance.com for details, and see you in Chicago in April! __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] for help on building a R package with several R function and a bunch of c, c++
I think the first question should be how to build a R function to call a bunch of C ,C++ which include one main program, and a makefile. My goal to build a R package will be next step. I read Rcpp , I am not sure if RcppResultSet can solve my problem or other function. Once I make sure it work I need ask UNIX adminstrator to install it. I think it shouldn't be very complex, as I know to build a R function easy with one C function. Thanks you for yout attention! Alex --- On Fri, 3/5/10, Dirk Eddelbuettel e...@debian.org wrote: From: Dirk Eddelbuettel e...@debian.org Subject: Re: [Rd] for help on building a R package with several R function and a bunch of c, c++ To: alex46...@yahoo.com Cc: r-devel@r-project.org Date: Friday, March 5, 2010, 8:25 PM On 5 March 2010 at 13:15, alex46...@yahoo.com wrote: | Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. These R function here are independent of c++ code. I prefer to define one R function to call this c++ program (main function). | | I know how to build R package with just R function, but I don't know how to handle those c++ c code after I copied those code in ./src, I am reading manual Writing R Extensions , but I did n't catch the key point . Do you know any easy way to do it? , When you asked _that exact same question_ this morning on r-help, you got the following answer: From: Whit Armstrong armstrong.w...@gmail.com To: alex46...@yahoo.com Cc: r-h...@r-project.org Subject: Re: [R] for help on building a R package with several R function and a bunch of c, c++ Date: Fri, 5 Mar 2010 10:33:54 -0500 Pick up Rcpp, make your life easier. http://dirk.eddelbuettel.com/code/rcpp.html -Whit On Fri, Mar 5, 2010 at 9:19 AM, alex46...@yahoo.com wrote: Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. R function here are independent c++ code. I prefer to define one R function to call this c++ program. Do you know any easy way to do it? I am reading manual Writing R Extensions, I didn't catch the key point. I know how to build R package with just R function, If I put all c++ code and makefile in /src...what I need do? Thank you in advance! Alex Now, can you let us know a) what part of the answer was unclear to you, and b) what made you think you needed to repost _the identical question_ here | Thank you in advance! You're welcome. Dirk | Alex | | __ | R-devel@r-project.org mailing list | https://stat.ethz.ch/mailman/listinfo/r-devel -- Registration is open for the 2nd International conference R / Finance 2010 See http://www.RinFinance.com for details, and see you in Chicago in April! [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Rmpi on CentOS (64bit)
On Wed, 03-Mar-2010 at 07:53PM +1300, Patrick Connolly wrote: | I got Rmpi to compile with little difficulty, but had a tricky time | setting the LD_LIBRARY_PATH to use the OpenMPI libs. I now get a | different error when I try to load Rmpi | | | require(Rmpi) | Loading required package: Rmpi | librdmacm: couldn't read ABI version. | librdmacm: assuming: 4 | libibverbs: Fatal: couldn't read uverbs ABI version. | CMA: unable to open /dev/infiniband/rdma_cm | -- | WARNING: Failed to open OpenIB-cma [DAT_INTERNAL_ERROR:]. | This may be a real error or it may be an invalid entry in the uDAPL | Registry which is contained in the dat.conf file. Contact your local | System Administrator to confirm the availability of the interfaces in | the dat.conf file. | -- I looked further into this uDAPL thing and found an FAQ: http://www.open-mpi.org/faq/?category=udapl This one was particularly interesting: 3. Where is the static uDAPL Registry found? Solaris: /etc/dat/dat.conf Linux: /etc/dat.conf On my CentOS installation, I have two, neither of which is where it's supposed to be for Linux in the opinion of open-mpi.org. $ locate dat.conf /etc/ofed/dat.conf /etc/ofed/compat-dapl/dat.conf /usr/share/man/man5/dat.conf.5.gz Would there be a way at the time of compiling Rmpi to specify a configure arg to use one or other of the ones I have? Or would it be simpler to make a link in /etc/ to one or other of them? Is there any danger that such a link could bother anything else? best -- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ___Patrick Connolly {~._.~} Great minds discuss ideas _( Y )_ Average minds discuss events (:_~*~_:) Small minds discuss people (_)-(_) . Eleanor Roosevelt ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel