Re: [Rd] My retraced version of R logo in SVG
Dear Tobias, thanks a lot, this looks very nice. I just exported it to PDF and can zoom in and out with great results. I think we should replace the current logo with bitmaps (where necessary) of your version and would the be able to use vector versions wherever possible. Great work really appreciated! Best, Fritz Salvete, when over the the weekend I found myself incapable of looking at any more numbers and code, seeing the R logo, I wondered how one would go about replicating the old-fashioned faux 3D effects it uses. I thought it would make for a good distraction and exercise to try and mimic it in SVG as close as possible, tracing the simple shapes by hand and using layered gradients. This is the result: http://www.alice-dsl.net/~towolf/rlogo/Rlogo-novo.svg for comparison, this is the PNG logo at the same size http://svn.r-project.org/R-dev-web/trunk/Logo/Rlogo-2.png The SVG is stripped down to 80K and the PNG is 200K. I also have a version with preserved Inkscape metadata at 140K and a 2K versoin with only the two flat shapes: http://www.alice-dsl.net/~towolf/rlogo/Rlogo-novo-editable.svg http://www.alice-dsl.net/~towolf/rlogo/Rlogo-simple.svg I thought someone might find a use for these. If yes, just go ahead. Itâs easy to edit these files. Change the color, make them prettier, or more physically plausible in terms of shading. I just put them under cc-by-sa. --Tobias __ 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] Scripting SVG with R
Wolfgang, I am currently working on this very thing under Duncan Temple Lang. Or, to be more precise what you are describing is one piece of our overarching goal, which is to create a system in which R can be run from within a browser (currently FireFox) with bi-directional communication occurring between the javascript/svg/flash engines and R. This will allow us to, for example, build web pages which can contain both R code (which can be executed in-browser) and livegraphics devices in the form of javascript/svg/flash canvases, as per your query. It will also, eg, allow for the building of rich, easily customizable GUIs for R through the (relatively painless though not easy to do well) process of designing interactive/multimedia web pages. Duncan has done quite a bit of work of this nature in the past, even going so far as embedding R in the Netscape browser some 10 years ago (SNetscapehttp://www.omegahat.org/SNetscape/note this is quite outdated now). More recently, last summer he created a package (RFirefox, not currently available, see below) which embeds R within Firefox (3.5) but currently only allows for communication from javascript down into R (so R code can be evaluated and the results passed back up to the javascript engine), before handing the project off to me to work on under his supervision. Currently the installation/configuration is _very_ fragile/nonexistent, and as I said, only one direction of communication is possible. We are currently working on implementing communication with javascript (and eventually flash, though this is not a priority) objects/methods from within R. This will allow us to draw to draw directly to javascript canvases from within an R process, among many other useful (and not so useful) capabilities. We hope to have a usable alpha/proof-of-concept release with bi-directional communication between XUL/javascript and R and a mildly-robust installation procedure sometime within the next few weeks (3-6), with a paper, live examples, and a more complete/robust package to follow. Glad to see there is some interest :) Sincerely, Gabe Becker On Wed, Oct 13, 2010 at 8:30 AM, Wolfgang Huber whu...@embl.de wrote: Since now many browsers support (ECMA/Java-)scripted SVG, I am wondering whether there are already any examples of inserting R code into SVG documents (or a Javascript canvas?) either directly, or perhaps more likely through a JavaScript layer, to dynamically generate graphics or make them interactive? I am aware of the excellent packages gridSVG and SVGAnnotation, which facilitate making R-generated SVG plots more interesting either at construction time or by postprocessing; the above question is about employing R at viewing time. Best wishes Wolfgang Huber EMBL http://www.embl.de/research/units/genome_biology/huber __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Adding more man page links to base::all.vars
I was having a hard time finding the all.vars function (and wound up creating a poor man's version -- see below). I see that there are links to all.vars in the stats/man/case.names.Rd and stats/man/formula.Rd. I was wondering if more crosslinks could be made for this function, particularly in base/man/substitute.Rd. Also base/man/allnames.Rd does not contain a link with any other man page and so perhaps it can return the favor to substitute. Cheers, Patrick poorMansAllVars - function(expr = expression(), vars = character()) { ## kludge to ignore function symbols by naming all functions ..__.. expr - substitute(expr) if (typeof(expr) != language) stop('expr' should be typeof \language\) expr - parse(text = paste(gsub(\\w*\\(, ..__..\\(, deparse(expr)), collapse = )) if (length(expr) 0L) expr - expr[[1L]] ## end kludge boundEnv - new.env(hash = TRUE, parent = emptyenv()) foundEnv - new.env(hash = TRUE, parent = emptyenv()) lapply(vars, function(object) { found - function() {assign(object, TRUE, envir = foundEnv)} makeActiveBinding(object, found, boundEnv) }) do.call(substitute, list(expr, boundEnv)) ls(foundEnv, all.names = TRUE) } Patrick [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Package 'nlme' fails 'make check-all' in R 2.12.0 patched built from source
Hi all, I am building R 2.12.0 patched this morning from source on Snow Leopard (10.6.4). In fact, three times now, with separate clean source and build directories each time, just to be sure that the issue is predictable. I would be happy to have somebody tell me that I am missing something fundamental here also... After running make check-all, I get the following error for 'nlme': * using log directory ‘/Users/marcschwartz/R.Files/SourceCode/32bitR/tests/nlme.Rcheck’ * using R version 2.12.0 Patched (2010-10-15 r53323) * using platform: i386-apple-darwin10.4.0 (32-bit) * using session charset: UTF-8 * checking for file ‘nlme/DESCRIPTION’ ... OK * this is package ‘nlme’ version ‘3.1-97’ * checking package name space information ... OK * checking package dependencies ... ERROR Package required but not available: Hmisc See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. From what I can tell, nlme is the only core/recommended package that now has a Suggests in the DESCRIPTION file for a non-core/non-recommended package. This Suggests for Frank's Hmisc appears to be new as of version 3.1.-97 of nlme. A search of the examples/tests for nlme yields an example in augPred_lab.R as follows, which appears to be the only code based reference to Hmisc in the nlme package: library(nlme) if(require(Hmisc)) { T.aug - Orthodont label(T.aug$age) - 'anyL' foo - augPred(lme(distance ~ age, random = ~1|Subject, data=T.aug)) ## failed in 3.1-72 } ## failed even if there is a variable with a class that is not being used. T.aug - Orthodont T.aug$newage - T.aug$age class(T.aug$newage) - 'anyC' foo - augPred(lme(distance ~ age, random = ~1|Subject, data=T.aug)) ## failed in 3.1-72 The above example/test is not new to the package, so it would seem that something has changed in the handling of Suggests in the package DESCRIPTION file in 2.12.0. A check of the log for nlme on CRAN does not reveal any problems for 2.12.0, but presumably since Hmisc would be available there, the check would not logically fail, whereas with a clean local build not containing any add-on packages, it would. Running R CMD check from the CLI directly on the nlme package using 2.12.0 yields: ./R CMD check nlme_3.1-97.tar.gz * using log directory ‘/Users/marcschwartz/R.Files/SourceCode/32bitR/bin/nlme.Rcheck’ * using R version 2.12.0 Patched (2010-10-15 r53329) * using platform: i386-apple-darwin10.4.0 (32-bit) * using session charset: UTF-8 * checking for file ‘nlme/DESCRIPTION’ ... OK * this is package ‘nlme’ version ‘3.1-97’ * checking package name space information ... OK * checking package dependencies ... ERROR Package required but not available: Hmisc See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. whereas running R CMD check using 2.11.1 patched on the same new version of nlme does not yield an error. So, again, it would seem that something has changed in 2.12.0. From a review of R-Exts, the following language was in 2.11.1 patched in section 1.1.1 for the 'general rules': All packages that are needed to successfully run R CMD check on the package must be listed in one of ‘Depends’ or ‘Suggests’ or ‘Imports’. whereas in 2.12.0: All packages that are needed to successfully run R CMD check on the package must be listed in one of ‘Depends’ or ‘Suggests’ or ‘Imports’. Packages used to run examples or tests conditionally (e.g. via if(require(pkgname))) should be listed in ‘Suggests’ or ‘Enhances’. (This allows checkers to ensure that all the packages needed for a complete check are installed.) So, without looking through code in the 'tools' package yet, it would seem that the tests in 2.12.0 are perhaps intended to be more rigorous, although I did not see an obvious change in the language in the 'checking packages' section of R-Exts, under bullet number 5 regarding the tests aborting. This leads me to the question, in the case of nlme, should R CMD check fail if Hmisc is not present in a clean build tree? Or, should the use of Hmisc in the example be removed along with the Suggests entry in the DESCRIPTION file, such that none of the core/recommended packages are dependent upon any third party packages? The former may be a functional issue, whereas the latter would seem to me to be an appropriate policy issue (not specifically pertaining to Hmisc or Frank, of course). Thanks, Marc Schwartz __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] calling browser on error
Dear R-developers, I am trying to figure out a way to call browser() when an error occur, and naturally I want the browser() to be called in the environment of the error. I tried something simple in vain: f - function() { x - 1; stop('ok') } tryCatch(f(), error=browser()) Called from: tryCatch(f(), error = browser()) ## if browser() was called in the local environment of f then 'x' would be set, but it's not Browse[1] x Error: object 'x' not found Browse[1] Q Is there a way to make it work? What do people do to 'set an on-error breakpoint'? Thanks, Vadim Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] calling browser on error
I believe options(error=recover) will do what you want. -- Joshua Ulrich | FOSS Trading: www.fosstrading.com On Fri, Oct 15, 2010 at 1:27 PM, Vadim Ogranovich vogranov...@jumptrading.com wrote: Dear R-developers, I am trying to figure out a way to call browser() when an error occur, and naturally I want the browser() to be called in the environment of the error. I tried something simple in vain: f - function() { x - 1; stop('ok') } tryCatch(f(), error=browser()) Called from: tryCatch(f(), error = browser()) ## if browser() was called in the local environment of f then 'x' would be set, but it's not Browse[1] x Error: object 'x' not found Browse[1] Q Is there a way to make it work? What do people do to 'set an on-error breakpoint'? Thanks, Vadim Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ 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] Package 'nlme' fails 'make check-all' in R 2.12.0 patched built from source
Marc, For make check-all you may need to set setenv _R_CHECK_FORCE_SUGGESTS_ FALSE Yes, there is a change in nlme, because packages needed for complete testing are required to be listed in DESCRIPTION: see 'Writing R Extensions'. Most of us have that environmnet variable set. Brian On Fri, 15 Oct 2010, Marc Schwartz wrote: Hi all, I am building R 2.12.0 patched this morning from source on Snow Leopard (10.6.4). In fact, three times now, with separate clean source and build directories each time, just to be sure that the issue is predictable. I would be happy to have somebody tell me that I am missing something fundamental here also... After running make check-all, I get the following error for 'nlme': * using log directory ‘/Users/marcschwartz/R.Files/SourceCode/32bitR/tests/nlme.Rcheck’ * using R version 2.12.0 Patched (2010-10-15 r53323) * using platform: i386-apple-darwin10.4.0 (32-bit) * using session charset: UTF-8 * checking for file ‘nlme/DESCRIPTION’ ... OK * this is package ‘nlme’ version ‘3.1-97’ * checking package name space information ... OK * checking package dependencies ... ERROR Package required but not available: Hmisc See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. From what I can tell, nlme is the only core/recommended package that now has a Suggests in the DESCRIPTION file for a non-core/non-recommended package. This Suggests for Frank's Hmisc appears to be new as of version 3.1.-97 of nlme. A search of the examples/tests for nlme yields an example in augPred_lab.R as follows, which appears to be the only code based reference to Hmisc in the nlme package: library(nlme) if(require(Hmisc)) { T.aug - Orthodont label(T.aug$age) - 'anyL' foo - augPred(lme(distance ~ age, random = ~1|Subject, data=T.aug)) ## failed in 3.1-72 } ## failed even if there is a variable with a class that is not being used. T.aug - Orthodont T.aug$newage - T.aug$age class(T.aug$newage) - 'anyC' foo - augPred(lme(distance ~ age, random = ~1|Subject, data=T.aug)) ## failed in 3.1-72 The above example/test is not new to the package, so it would seem that something has changed in the handling of Suggests in the package DESCRIPTION file in 2.12.0. A check of the log for nlme on CRAN does not reveal any problems for 2.12.0, but presumably since Hmisc would be available there, the check would not logically fail, whereas with a clean local build not containing any add-on packages, it would. Running R CMD check from the CLI directly on the nlme package using 2.12.0 yields: ./R CMD check nlme_3.1-97.tar.gz * using log directory ‘/Users/marcschwartz/R.Files/SourceCode/32bitR/bin/nlme.Rcheck’ * using R version 2.12.0 Patched (2010-10-15 r53329) * using platform: i386-apple-darwin10.4.0 (32-bit) * using session charset: UTF-8 * checking for file ‘nlme/DESCRIPTION’ ... OK * this is package ‘nlme’ version ‘3.1-97’ * checking package name space information ... OK * checking package dependencies ... ERROR Package required but not available: Hmisc See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. whereas running R CMD check using 2.11.1 patched on the same new version of nlme does not yield an error. So, again, it would seem that something has changed in 2.12.0. From a review of R-Exts, the following language was in 2.11.1 patched in section 1.1.1 for the 'general rules': All packages that are needed to successfully run R CMD check on the package must be listed in one of ‘Depends’ or ‘Suggests’ or ‘Imports’. whereas in 2.12.0: All packages that are needed to successfully run R CMD check on the package must be listed in one of ‘Depends’ or ‘Suggests’ or ‘Imports’. Packages used to run examples or tests conditionally (e.g. via if(require(pkgname))) should be listed in ‘Suggests’ or ‘Enhances’. (This allows checkers to ensure that all the packages needed for a complete check are installed.) So, without looking through code in the 'tools' package yet, it would seem that the tests in 2.12.0 are perhaps intended to be more rigorous, although I did not see an obvious change in the language in the 'checking packages' section of R-Exts, under bullet number 5 regarding the tests aborting. This leads me to the question, in the case of nlme, should R CMD check fail if Hmisc is not present in a clean build tree? Or, should the use of Hmisc in the example be removed along with the Suggests entry in the DESCRIPTION file, such that none of the core/recommended packages are dependent upon any third party packages? The former may be a functional issue, whereas the latter would seem to me to be an appropriate policy issue (not specifically pertaining to Hmisc or Frank, of course). Thanks, Marc Schwartz __ R-devel@r-project.org mailing list
Re: [Rd] calling browser on error
Joshua, I didn't know about 'recover', thank you! Anyway it doesn't work for me: tryCatch((function() { x - 1; stop('ok') })(), error=recover()) Enter a frame number, or 0 to exit 1: tryCatch((function() { Selection: 1 Called from: eval(expr, envir, enclos) Browse[1] x Error: object 'x' not found Browse[1] Q Though it does work if I set options(error = recover): options(error = recover) (function() { x - 1; stop('ok') })() Error in (function() { : ok Enter a frame number, or 0 to exit 1: (function() { Selection: 1 Called from: eval(expr, envir, enclos) Browse[1] x [1] 1 Browse[1] Q I do not run the latest R so it might be the reason: version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 9.1 year 2009 month 06 day26 svn rev48839 language R version.string R version 2.9.1 (2009-06-26) -Original Message- From: Joshua Ulrich [mailto:josh.m.ulr...@gmail.com] Sent: Friday, October 15, 2010 1:31 PM To: Vadim Ogranovich Cc: r-devel@r-project.org Subject: Re: [Rd] calling browser on error I believe options(error=recover) will do what you want. -- Joshua Ulrich | FOSS Trading: www.fosstrading.com On Fri, Oct 15, 2010 at 1:27 PM, Vadim Ogranovich vogranov...@jumptrading.com wrote: Dear R-developers, I am trying to figure out a way to call browser() when an error occur, and naturally I want the browser() to be called in the environment of the error. I tried something simple in vain: f - function() { x - 1; stop('ok') } tryCatch(f(), error=browser()) Called from: tryCatch(f(), error = browser()) ## if browser() was called in the local environment of f then 'x' would be set, but it's not Browse[1] x Error: object 'x' not found Browse[1] Q Is there a way to make it work? What do people do to 'set an on-error breakpoint'? Thanks, Vadim Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] calling browser on error
He said to use options(error=...) instead of tryCatch(error=...). In C++ lingo, the handler set by options(error) is called when the exception is thrown while tryCatch's handler is called when it is caught. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Vadim Ogranovich Sent: Friday, October 15, 2010 11:45 AM To: 'Joshua Ulrich' Cc: r-devel@r-project.org Subject: Re: [Rd] calling browser on error Joshua, I didn't know about 'recover', thank you! Anyway it doesn't work for me: tryCatch((function() { x - 1; stop('ok') })(), error=recover()) Enter a frame number, or 0 to exit 1: tryCatch((function() { Selection: 1 Called from: eval(expr, envir, enclos) Browse[1] x Error: object 'x' not found Browse[1] Q Though it does work if I set options(error = recover): options(error = recover) (function() { x - 1; stop('ok') })() Error in (function() { : ok Enter a frame number, or 0 to exit 1: (function() { Selection: 1 Called from: eval(expr, envir, enclos) Browse[1] x [1] 1 Browse[1] Q I do not run the latest R so it might be the reason: version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 9.1 year 2009 month 06 day26 svn rev48839 language R version.string R version 2.9.1 (2009-06-26) -Original Message- From: Joshua Ulrich [mailto:josh.m.ulr...@gmail.com] Sent: Friday, October 15, 2010 1:31 PM To: Vadim Ogranovich Cc: r-devel@r-project.org Subject: Re: [Rd] calling browser on error I believe options(error=recover) will do what you want. -- Joshua Ulrich | FOSS Trading: www.fosstrading.com On Fri, Oct 15, 2010 at 1:27 PM, Vadim Ogranovich vogranov...@jumptrading.com wrote: Dear R-developers, I am trying to figure out a way to call browser() when an error occur, and naturally I want the browser() to be called in the environment of the error. I tried something simple in vain: f - function() { x - 1; stop('ok') } tryCatch(f(), error=browser()) Called from: tryCatch(f(), error = browser()) ## if browser() was called in the local environment of f then 'x' would be set, but it's not Browse[1] x Error: object 'x' not found Browse[1] Q Is there a way to make it work? What do people do to 'set an on-error breakpoint'? Thanks, Vadim Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ 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] Package 'nlme' fails 'make check-all' in R 2.12.0 patched built from source
On Oct 15, 2010, at 1:44 PM, Prof Brian Ripley wrote: Marc, For make check-all you may need to set setenv _R_CHECK_FORCE_SUGGESTS_ FALSE Yes, there is a change in nlme, because packages needed for complete testing are required to be listed in DESCRIPTION: see 'Writing R Extensions'. Most of us have that environmnet variable set. Brian snip A quick follow up here. Thanks to Prof. Ripley for the pointer to the above env variable. Setting that now obviates the issue and the build now passes 'make check-all'. And...apologies that I did not have a chance to test/catch this prior to release today. Thanks much, Marc __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Missing libpthread in RTools
It appears that Mingw gcc included in RTools is missing a dependent library. If I compile a program with '-lgomp' switch (for OpenMP support), I get a errors about undefined references to functions like '_imp__pthread_mutex_destroy'. Adding the '-static' switch, I get the following error: c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread Sure enough, there is neither libpthread.a nor libpthread.dll under RTools' installation directory. I think these library are standard in Cygwin. Is there any chance to include them in RTools, too? Davor __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Missing libpthread in RTools
On 15/10/2010 4:53 PM, Davor Cubranic wrote: It appears that Mingw gcc included in RTools is missing a dependent library. If I compile a program with '-lgomp' switch (for OpenMP support), I get a errors about undefined references to functions like '_imp__pthread_mutex_destroy'. Adding the '-static' switch, I get the following error: c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread Sure enough, there is neither libpthread.a nor libpthread.dll under RTools' installation directory. I think these library are standard in Cygwin. Is there any chance to include them in RTools, too? Rtools is for building R, and that library isn't needed in R. If you want it for some particular purpose, can't you just install a copy on your machine? Duncan Murdoch Davor __ 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] calling browser on error
On Fri, 15 Oct 2010, William Dunlap wrote: He said to use options(error=...) instead of tryCatch(error=...). In C++ lingo, the handler set by options(error) is called when the exception is thrown while tryCatch's handler is called when it is caught. withCallingHandlers is another option. luke Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Vadim Ogranovich Sent: Friday, October 15, 2010 11:45 AM To: 'Joshua Ulrich' Cc: r-devel@r-project.org Subject: Re: [Rd] calling browser on error Joshua, I didn't know about 'recover', thank you! Anyway it doesn't work for me: tryCatch((function() { x - 1; stop('ok') })(), error=recover()) Enter a frame number, or 0 to exit 1: tryCatch((function() { Selection: 1 Called from: eval(expr, envir, enclos) Browse[1] x Error: object 'x' not found Browse[1] Q Though it does work if I set options(error = recover): options(error = recover) (function() { x - 1; stop('ok') })() Error in (function() { : ok Enter a frame number, or 0 to exit 1: (function() { Selection: 1 Called from: eval(expr, envir, enclos) Browse[1] x [1] 1 Browse[1] Q I do not run the latest R so it might be the reason: version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 9.1 year 2009 month 06 day26 svn rev48839 language R version.string R version 2.9.1 (2009-06-26) -Original Message- From: Joshua Ulrich [mailto:josh.m.ulr...@gmail.com] Sent: Friday, October 15, 2010 1:31 PM To: Vadim Ogranovich Cc: r-devel@r-project.org Subject: Re: [Rd] calling browser on error I believe options(error=recover) will do what you want. -- Joshua Ulrich | FOSS Trading: www.fosstrading.com On Fri, Oct 15, 2010 at 1:27 PM, Vadim Ogranovich vogranov...@jumptrading.com wrote: Dear R-developers, I am trying to figure out a way to call browser() when an error occur, and naturally I want the browser() to be called in the environment of the error. I tried something simple in vain: f - function() { x - 1; stop('ok') } tryCatch(f(), error=browser()) Called from: tryCatch(f(), error = browser()) ## if browser() was called in the local environment of f then 'x' would be set, but it's not Browse[1] x Error: object 'x' not found Browse[1] Q Is there a way to make it work? What do people do to 'set an on-error breakpoint'? Thanks, Vadim Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ 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 -- Luke Tierney Statistics and Actuarial Science Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics andFax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: l...@stat.uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu