Re: [Rd] Revision of shell.exec?

2011-09-14 Thread Simon Urbanek
On Sep 14, 2011, at 11:08 AM, Brian Oney wrote: Hi Steve, a quick look at browseURL will tell you that indeed system or shell.exec (on a windows platform) is used to open up a URL. The open part of the proposed function was written to work on a Mac. Because Mac is a unix platform, I

Re: [Rd] Revision of shell.exec?

2011-09-14 Thread Simon Urbanek
guessing this little beauty is the engine of shell.exec. (An honest) cheers, Brian On 9/14/2011 7:49 PM, Simon Urbanek wrote: On Sep 14, 2011, at 1:10 PM, Henrik Bengtsson wrote: On Wed, Sep 14, 2011 at 8:35 AM, Simon Urbanek simon.urba...@r-project.org wrote: On Sep 14, 2011, at 11

Re: [Rd] Revision of shell.exec?

2011-09-14 Thread Simon Urbanek
On Sep 14, 2011, at 4:44 PM, Dirk Eddelbuettel wrote: On 14 September 2011 at 16:22, Simon Urbanek wrote: | | On Sep 14, 2011, at 4:15 PM, Brian Oney wrote: | | Hi there, | new idea (at 10 at night). All the emails keep me thinking (btw thanks for all the feedback). | What does

Re: [Rd] Link between Qt GUI and R

2011-09-11 Thread Simon Urbanek
On Sep 11, 2011, at 6:30 AM, typhoong wrote: hi, i want to build a Qt front-end GUI which communicates with R, and i am not sure what i should use for the interface. There seems to be many ways: R.dll, Rinside, Rcpp, RQt, Rtools... . what is the best way? please advice. I think qtgui

Re: [Rd] As a package author, is there a way to specify that your package is architecture (x86_64) specific?

2011-09-09 Thread Simon Urbanek
Steve, On Sep 9, 2011, at 8:36 AM, Prof Brian Ripley wrote: On Thu, 8 Sep 2011, Steve Lianoglou wrote: Hi Simon, Thanks for the quick response. Comments in line: On Thu, Sep 8, 2011 at 4:11 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Sep 8, 2011, at 3:59 PM, Steve

Re: [Rd] As a package author, is there a way to specify that your package is architecture (x86_64) specific?

2011-09-09 Thread Simon Urbanek
On Sep 9, 2011, at 10:30 AM, Steve Lianoglou wrote: Hi Simon, Prof. Ripley, and Dirk, First: thanks again for the tips, it's great to have some of the top bRass providing this type of help. Last (few) comments in line: On Fri, Sep 9, 2011 at 9:41 AM, Simon Urbanek simon.urba...@r

Re: [Rd] repeatable segfault - on Mac

2011-09-08 Thread Simon Urbanek
On Sep 8, 2011, at 4:01 AM, Martin Maechler wrote: David Winsemius dwinsem...@comcast.net on Tue, 6 Sep 2011 00:38:13 -0400 writes: I can reproduce: eigen(crossprod(matrix(1:2000, 50)) + (0+0i), T, T) *** caught segfault *** address 0x102d0e028, cause 'memory not mapped'

Re: [Rd] As a package author, is there a way to specify that your package is architecture (x86_64) specific?

2011-09-08 Thread Simon Urbanek
On Sep 8, 2011, at 3:59 PM, Steve Lianoglou wrote: Hi, Essentially: subject line says it all. I've created a package that wraps an external c++ library (which I didn't write) that only successfully compiles on 64bit machines. That doesn't sound right, it contradicts your subject line

Re: [Rd] Refresh every minute

2011-09-07 Thread Simon Urbanek
On Sep 7, 2011, at 3:27 PM, Schatzi wrote: I would like some code to rerun every minute, automatically (it calls time and I want this to update). Here is the code (it is really the plot that I am interested in): hourc-as.numeric(substr(date(),12,13))

Re: [Rd] How to safely using OpenMP pragma inside a .C() function?

2011-08-31 Thread Simon Urbanek
On Aug 30, 2011, at 12:57 PM, pawelm wrote: Simon, I found that files R-2.13.1/src/library/stats/src/distance.c and R-2.13.1/src/main/array.c have openmp code (example below). I have couple questions regarding best practices when using R internals and openmp. Can we use

Re: [Rd] How to safely using OpenMP pragma inside a .C() function?

2011-08-31 Thread Simon Urbanek
On Aug 30, 2011, at 12:57 PM, pawelm wrote: Simon, I found that files R-2.13.1/src/library/stats/src/distance.c and R-2.13.1/src/main/array.c have openmp code (example below). I have couple questions regarding best practices when using R internals and openmp. Can we use

Re: [Rd] How to safely using OpenMP pragma inside a .C() function?

2011-08-31 Thread Simon Urbanek
Pawel, On Aug 31, 2011, at 4:46 PM, pawelm wrote: I just found this (performance improvement of the dist function when using openmp): .Internal(setMaxNumMathThreads(1)); .Internal(setNumMathThreads(1)); m - matrix(rnorm(81),900,900); system.time(d - dist(m)) user system elapsed

Re: [Rd] How to safely using OpenMP pragma inside a .C() function?

2011-08-29 Thread Simon Urbanek
On Aug 29, 2011, at 7:48 PM, Alireza Mahani wrote: I am trying to parallelize part of a C function that is called from R (via .C) using OpenMP's parallel for pragma. I get mixed results: some runs finish with no problem, but some lead to R crashing after issuing a long error message

Re: [Rd] Licensing Issue with JRI

2011-08-25 Thread Simon Urbanek
On Aug 19, 2011, at 10:26 PM, Lokkju Brennr wrote: Hoping someone can clear up a licencing question... My understanding is that R is licensed under the GPL, with some headers licensed under the LGPL (per COPYRIGHTS, so that R plugins don't have to be GPL - arguably incorrect, but besides

Re: [Rd] Licensing Issue with JRI

2011-08-25 Thread Simon Urbanek
that you use. Cheers, Simon On Thu, Aug 25, 2011 at 8:24 AM, Simon Urbanek simon.urba...@r-project.org wrote: On Aug 19, 2011, at 10:26 PM, Lokkju Brennr wrote: Hoping someone can clear up a licencing question... My understanding is that R is licensed under the GPL, with some headers

Re: [Rd] build 32-bit R on x86_64?

2011-08-09 Thread Simon Urbanek
On Aug 9, 2011, at 8:12 PM, Dirk Eddelbuettel wrote: Hi Vinh, On 9 August 2011 at 16:40, Vinh Nguyen wrote: | Dear R-Devel, | | I'm using Ubuntu on an x86_64 machine and would like to have both the | 32-bit and 64-bit versions of R built from source. By default, | following the

Re: [Rd] build 32-bit R on x86_64?

2011-08-09 Thread Simon Urbanek
On Aug 9, 2011, at 9:41 PM, Dirk Eddelbuettel wrote: On 9 August 2011 at 21:24, Simon Urbanek wrote: | | On Aug 9, 2011, at 8:12 PM, Dirk Eddelbuettel wrote: | | | Hi Vinh, | | On 9 August 2011 at 16:40, Vinh Nguyen wrote: | | Dear R-Devel, | | | | I'm using Ubuntu

[Rd] OpenCL [Was: Tesla GPUs]

2011-08-08 Thread Simon Urbanek
to run fair single-precision tests, because R needs to convert both input and output vectors to/from double precision). Its home is at http://rforge.net/OpenCL and CRAN deo volente it may appear on CRAN soon. Cheers, Simon On Aug 5, 2011, at 2:36 PM, Simon Urbanek wrote: On Jul 19, 2011, at 12

Re: [Rd] initFields() method no longer coerces arguments in R-devel

2011-08-05 Thread Simon Urbanek
It's worth actually reading the list you post to ... http://r.789695.n4.nabble.com/Reference-classes-assignments-to-fields-td3708168.html On Aug 5, 2011, at 6:41 AM, Jon Clayden wrote: Dear all, I've just had a package update bounced from CRAN because of a recent change in R-devel which

Re: [Rd] Tesla GPUs

2011-08-05 Thread Simon Urbanek
On Jul 19, 2011, at 12:56 PM, Simon Urbanek wrote: On Jul 19, 2011, at 2:26 AM, Prof Brian Ripley wrote: On Mon, 18 Jul 2011, Alireza Mahani wrote: Simon, Thank you for elaborating on the limitations of R in handling float types. I think I'm pretty much there with you

Re: [Rd] slightly speeding up readChar()

2011-08-04 Thread Simon Urbanek
On Aug 4, 2011, at 5:26 PM, Michael Lachmann wrote: Hi, I was trying to have R read files faster with readChar(). That was before I noticed that readChar() is not that bad! In any case, below I suggest a few simple changes that will make readChar slightly faster. I followed

Re: [Rd] example package for devel newcomers

2011-08-03 Thread Simon Urbanek
Alexandre, thanks, I see your point. Somehow I parsed your e-mail as the inverse (and Dan's suggestion which I feel did the same didn't help ;)). Embedding PHP into R sound like fun and in fact FastRWeb would benefit from your package :). In that light you may want to explain why you need 2-5

Re: [Rd] example package for devel newcomers

2011-08-03 Thread Simon Urbanek
Alexandre, On Aug 3, 2011, at 1:19 PM, Alexandre Aguiar wrote: Simon, Em Quarta 03 Agosto 2011, você escreveu: In that light you may want to explain why you need 2-5 since the easiest way is to simply link to libphp. Resources accessible to libphp through apache are limited by ssytem

Re: [Rd] example package for devel newcomers

2011-08-02 Thread Simon Urbanek
.. also note that there is Rserve PHP client (used, e.g., by FastRWeb) which works around a lot of the issues you encounter when you try to embed R into PHP (initialization cost, lack of thread-safety, no workspace separation etc.). Cheers, Simon On Aug 2, 2011, at 10:11 AM, Daniel Fuka

Re: [Rd] RApache error on RHEL/CentOS

2011-07-23 Thread Simon Urbanek
On Jul 23, 2011, at 4:28 PM, Jeroen Ooms wrote: I am running RApache (www.rapache.net) on CentOS 5.6 using the R binary from EPEL. After upgrading to R from 2.12 to 2.13 I am getting the following error when starting Apache: Cannot load /usr/lib/httpd/modules/mod_R.so into server:

Re: [Rd] Best practices for writing R functions

2011-07-22 Thread Simon Urbanek
On Jul 22, 2011, at 9:26 AM, Alireza Mahani wrote: I am developing an R package for internal use, and eventually for public release. My understanding is that there is no easy way to avoid copying function arguments in R (i.e. we don't have the concept of pointers in R), which makes me wary

Re: [Rd] Compiling R-2.13.1 with MKL in windows 7 64bit

2011-07-20 Thread Simon Urbanek
On Jul 20, 2011, at 3:01 PM, Duncan Murdoch wrote: On 20/07/2011 10:40 AM, WADA Kazuya wrote: Hi I don't know how to complie R-2.13.1 with MKL in windows 7 64bit. I can compile normal R in windows using Rtools under R-admin.html description. but, this way doesn't use ./configure

Re: [Rd] Manipulating single-precision (float) arrays in .Call functions

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 7:48 AM, Matthew Dowle wrote: Prof Brian Ripley rip...@stats.ox.ac.uk wrote in message news:alpine.lfd.2.02.1107190640280.28...@gannet.stats.ox.ac.uk... On Mon, 18 Jul 2011, Alireza Mahani wrote: Simon, Thank you for elaborating on the limitations of R in handling

[Rd] Tesla GPUs [Was: Manipulating single-precision (float) arrays in .Call functions]

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 2:26 AM, Prof Brian Ripley wrote: On Mon, 18 Jul 2011, Alireza Mahani wrote: Simon, Thank you for elaborating on the limitations of R in handling float types. I think I'm pretty much there with you. As for the insufficiency of single-precision math (and hence

Re: [Rd] Measuring and comparing .C and .Call overhead

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 11:07 AM, Alireza Mahani wrote: Further pursuing my curiosity to measure the efficiency of R/C++ interface, I conducted a simple matrix-vector multiplication test using .C and .Call functions in R. In each case, I measured the execution time in R, as well as inside the

Re: [Rd] hanging spaces prior to linebreak from cat()

2011-07-19 Thread Simon Urbanek
On Jul 19, 2011, at 10:44 AM, Tim Triche, Jr. wrote: (re-sending after confirming list subscription; apologies if this ends up being sent to the list twice) Is the expected behavior from cat(), as used below, a hanging space before \n at the end of the emitted line? firstheader =

Re: [Rd] Manipulating single-precision (float) arrays in .Call functions

2011-07-18 Thread Simon Urbanek
On Jul 18, 2011, at 6:15 PM, Alireza Mahani wrote: Duncan, Thank you for your reply. This is a rather unfortunate limitation, because for large data sizes there is a significant difference between the performance of '.C' and '.Call'. I think you may have missed the main point - R does

Re: [Rd] [datatable-help] speeding up perception

2011-07-12 Thread Simon Urbanek
is now implemented, FR#200. DT[i,j]-value is now handled by data.table in C rather than falling through to data.frame methods. Thanks to Ivo Welch for raising speed issues on r-devel, to Simon Urbanek for the suggestion, and Luke Tierney and Simon for information on R internals

Re: [Rd] [linux] connection never times out

2011-07-12 Thread Simon Urbanek
On Jul 12, 2011, at 4:22 PM, Jeroen Ooms wrote: Can you please verify the behaviour is still the same in a recent R-devel or at least R-2.13.1? And that there was no other already answered request on R-help or R-devel re. timeouts? The code below is R 2.13.1. It shows that the timeout time

Re: [Rd] [datatable-help] speeding up perception

2011-07-11 Thread Simon Urbanek
Fast update is now implemented, FR#200. DT[i,j]-value is now handled by data.table in C rather than falling through to data.frame methods. Thanks to Ivo Welch for raising speed issues on r-devel, to Simon Urbanek for the suggestion, and Luke Tierney and Simon for information on R

Re: [Rd] Vignette pdfs missing from zip file after Rcmd build --binary call

2011-07-07 Thread Simon Urbanek
On Jul 7, 2011, at 3:39 AM, Eli Holmes wrote: Hi, I have been building R packages for awhile on Windows, and I recently upgraded R and all required package creation tools to 2.13.0. I understand that there have been changes in that the R CMD build command no longer alters the source

Re: [Rd] [datatable-help] speeding up perception

2011-07-06 Thread Simon Urbanek
point ... Cheers, Simon On Jul 6, 2011, at 4:36 AM, Matthew Dowle wrote: On Tue, 2011-07-05 at 21:11 -0400, Simon Urbanek wrote: No subassignment function satisfies that condition, because you can always call them directly. However, that doesn't stop the default method from making

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-06 Thread Simon Urbanek
On Jul 6, 2011, at 10:06 AM, Kasper Daniel Hansen wrote: On Wed, Jul 6, 2011 at 9:42 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 11-07-06 9:25 AM, Kasper Daniel Hansen wrote: On Mon, Jul 4, 2011 at 8:08 AM, Prof Brian Ripleyrip...@stats.ox.ac.uk wrote: In the near future

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Simon Urbanek
On Jul 5, 2011, at 1:45 PM, Tobias Verbeke wrote: On 07/05/2011 04:21 PM, Duncan Murdoch wrote: On 05/07/2011 10:17 AM, Tobias Verbeke wrote: Dear Duncan, On 07/05/2011 03:25 PM, Duncan Murdoch wrote: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM,

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread Simon Urbanek
on it. When it doesn't break other data.table tests, I'll commit to R-Forge ... Matthew On Mon, 2011-07-04 at 12:41 -0400, Simon Urbanek wrote: Timothée, On Jul 4, 2011, at 2:47 AM, Timothée Carayol wrote: Hi -- It's my first post on this list; as a relatively new user with little

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread Simon Urbanek
the vector holding columns. Cheers, Simon Sent from my iPhone On Jul 5, 2011, at 9:01 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 5, 2011, at 7:18 PM, luke-tier...@uiowa.edu luke-tier...@uiowa.edu wrote: On Tue, 5 Jul 2011, Simon Urbanek wrote: On Jul 5, 2011, at 2:08 PM

Re: [Rd] speeding up perception

2011-07-04 Thread Simon Urbanek
Timothée, On Jul 4, 2011, at 2:47 AM, Timothée Carayol wrote: Hi -- It's my first post on this list; as a relatively new user with little knowledge of R internals, I am a bit intimidated by the depth of some of the discussions here, so please spare me if I say something incredibly silly.

Re: [Rd] speeding up perception

2011-07-03 Thread Simon Urbanek
earlier, if you want to loop subassignments over many elements: don't do that in the first place, but if you do, use lists or matrices, NOT data frames. Cheers, Simon On Jul 3, 2011, at 8:13 AM, Robert Stojnic wrote: Hi Simon, On 03/07/11 05:30, Simon Urbanek wrote: This is just a quick

Re: [Rd] speeding up perception

2011-07-02 Thread Simon Urbanek
This is just a quick, incomplete response, but the main misconception is really the use of data.frames. If you don't use the elaborate mechanics of data frames that involve the management of row names, then they are definitely the wrong tool to use, because most of the overhead is exactly to

Re: [Rd] Compilation error Mac binary

2011-06-29 Thread Simon Urbanek
On Jun 29, 2011, at 1:12 PM, Uwe Ligges wrote: Looks like a different boost version than the one you require. I'd suggest to talk to the Mac maintainer, Simon Urbanek (CCing). GUTS doesn't specify any system requirements, so obviously it has no business trying to use boost from the system

Re: [Rd] Compilation error Mac binary

2011-06-29 Thread Simon Urbanek
and somehow define the same things but differently ... Since Dirk uses the same boost (1.43 here) successfully in QuantLib he may know more ... Cheers, Simon On Jun 29, 2011, at 2:05 PM, Simon Urbanek wrote: On Jun 29, 2011, at 1:12 PM, Uwe Ligges wrote: Looks like a different boost version than

Re: [Rd] Compilation error Mac binary

2011-06-29 Thread Simon Urbanek
, Simon Urbanek wrote: On Jun 29, 2011, at 1:12 PM, Uwe Ligges wrote: Looks like a different boost version than the one you require. I'd suggest to talk to the Mac maintainer, Simon Urbanek (CCing). GUTS doesn't specify any system requirements, so obviously it has no business trying

Re: [Rd] (no subject)

2011-06-28 Thread Simon Urbanek
On Jun 28, 2011, at 9:58 AM, Michelle.Carey wrote: Hi, I am trying to write code in C for an R package. I need high precision in the form of the mpfr and gmp packages. gmp is available as R package http://cran.r-project.org/web/packages/gmp/index.html do you really need it at a lower

Re: [Rd] R CMD check --force-multiarch does not install all the archs for testing

2011-06-28 Thread Simon Urbanek
On Jun 28, 2011, at 3:01 PM, Hervé Pagès wrote: Hi Uwe, On 11-06-28 01:44 AM, Uwe Ligges wrote: On 28.06.2011 01:31, Hervé Pagès wrote: Hi, Why isn't 'R CMD check --force-multiarch' installing the package for all the architectures that are going to be checked? Hervé, no,

Re: [Rd] Small bug in install.packages?

2011-06-28 Thread Simon Urbanek
On Jun 28, 2011, at 3:03 PM, Hadley Wickham wrote: When capturing the path to the current R binary, install.packages does: cmd0 - paste(file.path(R.home(bin), R), CMD INSTALL) shouldn't that be cmd0 - shQuote(paste(file.path(R.home(bin), R), CMD INSTALL)) to allow paths with

Re: [Rd] R CMD check --force-multiarch does not install all the archs for testing

2011-06-28 Thread Simon Urbanek
On Jun 28, 2011, at 3:45 PM, Hervé Pagès wrote: Hi Simon, On 11-06-28 12:19 PM, Simon Urbanek wrote: On Jun 28, 2011, at 3:01 PM, Hervé Pagès wrote: Hi Uwe, On 11-06-28 01:44 AM, Uwe Ligges wrote: On 28.06.2011 01:31, Hervé Pagès wrote: Hi, Why isn't 'R CMD check --force

Re: [Rd] R CMD check --force-multiarch does not install all the archs for testing

2011-06-28 Thread Simon Urbanek
On Jun 28, 2011, at 5:11 PM, Hervé Pagès wrote: Simon, On 11-06-28 01:44 PM, Simon Urbanek wrote: On Jun 28, 2011, at 3:45 PM, Hervé Pagès wrote: Hi Simon, On 11-06-28 12:19 PM, Simon Urbanek wrote: On Jun 28, 2011, at 3:01 PM, Hervé Pagès wrote: Hi Uwe, On 11-06-28 01:44

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Simon Urbanek
On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: On 24/06/2011 22:04, John Chambers wrote: Strictly speaking, that is not meaningful. A class (like any R object) is uniquely referenced by a name *and an environment*. The name of a package can be used to construct the environment,

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Simon Urbanek
On Jun 27, 2011, at 8:43 AM, Renaud Gaujoux wrote: On 27/06/2011 14:27, Simon Urbanek wrote: On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: On 24/06/2011 22:04, John Chambers wrote: Strictly speaking, that is not meaningful. A class (like any R object) is uniquely referenced

Re: [Rd] arbitrary size data frame or other stcucts, curious about issues invovled.

2011-06-21 Thread Simon Urbanek
Mike, this is all nice, but AFAICS the first part misses the point that there is no 64-bit integer type in the API so there is simply no alternative at the moment. You just said that you don't like it, but you failed to provide a solution ... As for the second part, the idea is not new and is

Re: [Rd] Controlling stdin and stdout in an embedded R instance

2011-06-17 Thread Simon Urbanek
Mike, there are many examples of embedding R, one of them is rJava/JRI and you can see how to initialize R with custom callbacks at http://svn.rforge.net/org/trunk/rosuda/JRI/src/Rinit.c Cheers, Simon On Jun 16, 2011, at 6:47 PM, Mike Sonsini wrote: Hello, I am very new to R but my

Re: [Rd] Detecting development environment

2011-06-13 Thread Simon Urbanek
On Jun 13, 2011, at 10:21 AM, Hadley Wickham wrote: Hi all, Is there a straight-forward, cross-platform way of determining if a user has all the tools needed to develop R packages (i.e. gcc etc)? It doesn't need to be 100%, but should give a rough idea. One idea I had was simply to see

Re: [Rd] How to add a welcome message in Package development?

2011-06-10 Thread Simon Urbanek
On Jun 10, 2011, at 2:54 PM, Nipesh Bajaj wrote: Dear all, it is my first post in R-devel list, and hope that this is the right place to ask question related to package development. I have created my first package in Windows through the usual route. Now I want to add some ***Welcome

Re: [Rd] How to add a welcome message in Package development?

2011-06-10 Thread Simon Urbanek
On Jun 10, 2011, at 3:36 PM, Dirk Eddelbuettel wrote: On 10 June 2011 at 15:10, Simon Urbanek wrote: | | On Jun 10, 2011, at 2:54 PM, Nipesh Bajaj wrote: | | Dear all, it is my first post in R-devel list, and hope that this is | the right place to ask question related to package

Re: [Rd] Install R 2.14 From Source : lattice Error

2011-06-09 Thread Simon Urbanek
On Jun 9, 2011, at 3:00 AM, Dario Strbenac wrote: I'm installing the latest development version of R on Ubuntu 10.04 Revision: 56096 Last Changed Date: 2011-06-08 and the make command runs for a while, then I get : ** testing if installed package can be loaded Error in

Re: [Rd] warning: assignment discards qualifiers from pointer target type

2011-06-09 Thread Simon Urbanek
On Jun 9, 2011, at 11:15 AM, oliver wrote: On Thu, Jun 09, 2011 at 10:54:28AM -0400, Duncan Murdoch wrote: On 09/06/2011 9:28 AM, oliver wrote: On Thu, Jun 09, 2011 at 07:43:20AM -0400, Duncan Murdoch wrote: On 11-06-09 7:27 AM, oliver wrote: On Wed, Jun 08, 2011 at 08:35:34PM -0400, Simon

Re: [Rd] warning: assignment discards qualifiers from pointer target type

2011-06-08 Thread Simon Urbanek
On Jun 8, 2011, at 12:08 PM, oliver wrote: On Wed, Jun 08, 2011 at 12:22:10PM +0100, Prof Brian Ripley wrote: On Tue, 7 Jun 2011, Duncan Murdoch wrote: On 07/06/2011 9:08 AM, oliver wrote: Hello, following an advice here from the list I looked into sources of other packages (xts) and

Re: [Rd] warning: assignment discards qualifiers from pointer target type

2011-06-08 Thread Simon Urbanek
On Jun 8, 2011, at 8:32 PM, oliver wrote: On Thu, Jun 09, 2011 at 02:17:31AM +0200, oliver wrote: [...] OK, I looked at this now. LENGTH() checks the length of the vector. Good to know this. So the problem of a vector of length 0 can be with any arguments of type SEXP, hence I

Re: [Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-06 Thread Simon Urbanek
On Jun 5, 2011, at 12:22 PM, oliver wrote: On Sat, Jun 04, 2011 at 07:51:08AM -0400, Duncan Murdoch wrote: On 11-06-03 4:19 PM, oliver wrote: On Fri, Jun 03, 2011 at 11:14:39AM -0500, Douglas Bates wrote: On Fri, Jun 3, 2011 at 5:17 AM, oliveroli...@first.in-berlin.de wrote: Hello, I'm

Re: [Rd] Interfacing a C++ class

2011-06-04 Thread Simon Urbanek
On Jun 4, 2011, at 10:31 AM, soeren.vo...@uzh.ch wrote: Hello Apologies for cross-posting, the discussion should (if) go to R-devel, but I also want to reach the rcpp-devel people. My C++ class FOO is a module available through Rcpp, and it works fine and is -- so far -- bug free.

Re: [Rd] Problem to execute a function loading by my package that I created

2011-06-03 Thread Simon Urbanek
Pauline, since you mentioned Rcpp, you're on the wrong list. I have put some comments below but they assume you're using regular R packaging and not Rcpp. On Jun 3, 2011, at 4:41 AM, Po wrote: I still look for my problem. I think that maybe my Makefile is not good. In my folder src of my

Re: [Rd] GUI hooks in R [Was: assignInNamespace and new bindings]

2011-06-01 Thread Simon Urbanek
On May 31, 2011, at 5:23 PM, Thomas Friedrichsmeier wrote: On Tuesday 31 May 2011, Simon Urbanek wrote: The history entries are somewhat in a grey area, because most GUIs use their own implementation of history (and thus they are irrelevant) and the *history() commands are documented to only

Re: [Rd] GUI hooks in R [Was: assignInNamespace and new bindings]

2011-06-01 Thread Simon Urbanek
On Jun 1, 2011, at 1:50 PM, Thomas Friedrichsmeier wrote: On Wednesday 01 June 2011, Simon Urbanek wrote: I suppose, yes, it's possible, but I see somewhat of an asymmetry if done that way : GUIs are like plug-ins in that there is a set of functions they have to implement to work properly

Re: [Rd] assignInNamespace and new bindings

2011-05-31 Thread Simon Urbanek
Thomas, On May 31, 2011, at 2:16 PM, Thomas Friedrichsmeier wrote: On Tuesday 31 May 2011, luke-tier...@uiowa.edu wrote: Also note at the beginning of of th help file: Utility functions to access and replace the non-exported functions in a name space, for use in developing

[Rd] GUI hooks in R [Was: assignInNamespace and new bindings]

2011-05-31 Thread Simon Urbanek
On May 31, 2011, at 4:11 PM, Thomas Friedrichsmeier wrote: On Tuesday 31 May 2011, Simon Urbanek wrote: I would expect so, but I'll let Luke comment on it. It is definitely a very bad idea. R provides facilities for customization and other GUIs are using them properly. If you are lacking

Re: [Rd] Calling Rscript from Makevars

2011-05-20 Thread Simon Urbanek
On May 20, 2011, at 12:04 PM, Martyn Byng wrote: Hi, I am trying to package some code to use with R and wanted to call Rscript from within the Makevars file (I am trying to automate the setting of the location of a third party library depending on what is available / the system the

Re: [Rd] Calling Rscript from Makevars

2011-05-20 Thread Simon Urbanek
This is unrelated to the original question, so clarifications inline for posterity. On May 20, 2011, at 3:15 PM, Sean Robert McGuffee wrote: Hi, I've found this type of thing to be extremely confusing, myself, but I managed to get something to work. I'm not sure how well. I also don't know

Re: [Rd] Calling Rscript from Makevars

2011-05-20 Thread Simon Urbanek
Sean, On May 20, 2011, at 9:00 PM, Sean Robert McGuffee wrote: Note that setting PKG_LIBS in configure won't work since configure doesn't know how to handle it. It may be ok if you don't care that the flags won't be checked, but then you better know what you're doing ;). Why wouldn't

Re: [Rd] Error in svg() : cairo-based devices are not supported on this build

2011-05-19 Thread Simon Urbanek
On May 19, 2011, at 8:45 AM, Karl Forner wrote: Hello, Sorry if it is not the right place.. I installed R-2.13.0 on a x86_64 linux server. All went fine, but the svg() function yells: svg() Error in svg() : cairo-based devices are not supported on this build I have the Cairo,

Re: [Rd] r-2.13 fails make check

2011-05-19 Thread Simon Urbanek
Note to myself: read R-core before R-devel ;). It's apparently fixed by now. I have restarted the nightly build so the binaries should be up again soon. Cheers, Simon On May 19, 2011, at 10:03 AM, Simon Urbanek wrote: Yes, this must be from some commit yesterday, because the build from

Re: [Rd] S3 method dispatch - can methods come from the enclosing environment?

2011-05-17 Thread Simon Urbanek
Bill, I suspect you have a typo there [class(x) instead of class(z)] which is why it doesn't work. Without the typo it does: tstFn - local({ + print.tst - function(x, ...) cat(found it!) + + function(x) print(x) + }) z - The cat sat on the mat. class(z) - tst tstFn(z) found it!

Re: [Rd] R crashes if toFile given ~/ in Linux envirnonment

2011-05-16 Thread Simon Urbanek
Mark, I think you have the wrong list - this has nothing to do with R. to File() is a function in Rgraphviz and it doesn't crash, it simply exits R. Obviously it doesn't support path expansion (I suppose it should consider calling path.expand()) and it should also consider using R_error()

Re: [Rd] R html help system [Was: How to document man/*.Rd pages with images?]

2011-05-13 Thread Simon Urbanek
On May 13, 2011, at 7:08 PM, Sean Robert McGuffee wrote: On 5/12/11 9:13 AM, Simon Urbanek simon.urba...@r-project.org wrote: I just want to clarify the mechanics of the help system when using html. R has a built-in HTTP server (aka Rhttpd) which transforms HTTP requests to function

[Rd] R html help system [Was: How to document man/*.Rd pages with images?]

2011-05-12 Thread Simon Urbanek
I just want to clarify the mechanics of the help system when using html. R has a built-in HTTP server (aka Rhttpd) which transforms HTTP requests to function calls. It is not your usual web server, because it doesn't map URL paths to files, it just allows R functions to do anything with it --

Re: [Rd] How to document man/*.Rd pages with images?

2011-05-11 Thread Simon Urbanek
On May 11, 2011, at 4:00 PM, Thomas Roth wrote: Hi, There's a possibility to put images into documentation files. Have a look at the package visualizationTools to see how it works. The original idea is/was by Romain Francois as far as i remember. For instance have a look at the

Re: [Rd] How to document man/*.Rd pages with images?

2011-05-11 Thread Simon Urbanek
is not the back-end (e.g., in terminal) .. is this a bug? Cheers, S it only takes long because there's a simulation going on in the background... 2011/5/11 Simon Urbanek simon.urba...@r-project.org On May 11, 2011, at 4:00 PM, Thomas Roth wrote: Hi, There's a possibility to put images

Re: [Rd] How to document man/*.Rd pages with images?

2011-05-11 Thread Simon Urbanek
can as well do as Paul suggested, just ship the rendered image with the package..) Cheers, Simon 2011/5/11 Simon Urbanek simon.urba...@r-project.org On May 11, 2011, at 4:16 PM, Thomas Roth wrote: Well, it takes 5 seconds on a regular notebook... which i have Basically there's

Re: [Rd] fortan common block

2011-05-09 Thread Simon Urbanek
AFAIK it's all much simpler that you think. Technically common blocks are just FORTRAN's slightly complicated way to declare and access global variables. They have nothing to do with IPC - each process is loading SOs in its own virtual memory, so other processes are irrelevant (the actual

Re: [Rd] cerr and cout not working calling c++ from R

2011-05-07 Thread Simon Urbanek
On Fri, May 6, 2011 at 10:44 PM, Dirk Eddelbuettel e...@debian.org wrote: On 6 May 2011 at 22:09, Simon Urbanek wrote: | Sean, | | the path form the console is not under your control and it depends heavily on the internal settings in R (is console enabled, is R interactive, is the output

Re: [Rd] cerr and cout not working calling c++ from R

2011-05-06 Thread Simon Urbanek
Sean, the path form the console is not under your control and it depends heavily on the internal settings in R (is console enabled, is R interactive, is the output a tty or a file ...) - that's why you have to use Rprint/REprintf - that's the only path that is guaranteed to work. Anything else

Re: [Rd] problem with location of libraries 64-bit (opensuse)

2011-05-05 Thread Simon Urbanek
Detlef, On May 5, 2011, at 10:50 AM, Detlef Steuer wrote: Dear list, there seems to be a problem with the standard location of R´s 64-bit libs at least under openSUSE. I had two user questions regarding the compilation of rpy2 for 64-bit systems. Personally I don`t know rpy2 but maybe

Re: [Rd] R CMD check and Suggests Packages

2011-05-04 Thread Simon Urbanek
In current R it is described in R-ints instead: http://r.research.att.com/man/R-ints.html#Tools But don't ask me about the rationale. That said, you can search all manuals in Google by simply using foo site:http://r.research.att.com/man/ where foo is your query Cheers, S On May 4, 2011,

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-04 Thread Simon Urbanek
On May 4, 2011, at 12:00 PM, Yihui Xie wrote: My suggestion was to mimic *nix systems: put the executable binaries in the same place *by default* (e.g. /usr/bin/ or /usr/local/bin). Except that there is not such thing on Windows! The closest to that is the system folder which is off limits

Re: [Rd] How to create vignette.pdf for R-2.13.0?

2011-05-03 Thread Simon Urbanek
On May 3, 2011, at 4:48 PM, cstrato cstr...@aon.at wrote: Dear Uwe, Thank you, however since I use R CMD INSTALL xps.tar.gz my source code is not polluted. But then you already used build to create the tar ball so the vignette has been built. So what is your point? Cheers, S

Re: [Rd] How to create vignette.pdf for R-2.13.0?

2011-05-03 Thread Simon Urbanek
the R doing something wrong). Cheers, S On 5/3/11 11:11 PM, Simon Urbanek wrote: On May 3, 2011, at 4:48 PM, cstratocstr...@aon.at wrote: Dear Uwe, Thank you, however since I use R CMD INSTALL xps.tar.gz my source code is not polluted. But then you already used build to create

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-03 Thread Simon Urbanek
On May 3, 2011, at 11:25 PM, Yihui Xie wrote: 1. Few Windows users use these commands does not imply they are not useful, and I have no idea how many Windows users really use them. How do you run R CMD build when you build R packages under Windows? You don't write C:/Program

Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Simon Urbanek
On Apr 29, 2011, at 9:52 AM, Steve Lianoglou wrote: Hi, On Fri, Apr 29, 2011 at 5:29 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Fri, 29 Apr 2011, Dario Strbenac wrote: Hello, In my description file, I have an example data package in Suggests: that I've deleted from my

Re: [Rd] Thread synchronization [Was: Interrupting C++ code execution]

2011-04-27 Thread Simon Urbanek
me. Sean On 4/26/11 8:51 PM, Simon Urbanek simon.urba...@r-project.org wrote: Sean, On Apr 26, 2011, at 5:06 PM, Sean Robert McGuffee wrote: I've been thinking about how to handle c++ threads that were started via Rcpp calls to some of my c++ libraries from R. My main obstacle

Re: [Rd] Interrupting C++ code execution

2011-04-26 Thread Simon Urbanek
On Apr 26, 2011, at 7:30 AM, schattenpfla...@arcor.de wrote: I have tested the solutions suggested by Simon and Thomas on a Linux machine. These are my findings: On Windows you can look at the variable UserBreak, available from Rembedded.h. Outside of Windows, you can look at

[Rd] Thread synchronization [Was: Interrupting C++ code execution]

2011-04-26 Thread Simon Urbanek
inquiry should shift it further up on my todo stack ;)). Cheers, Simon On 4/26/11 9:21 AM, Simon Urbanek simon.urba...@r-project.org wrote: On Apr 26, 2011, at 7:30 AM, schattenpfla...@arcor.de wrote: I have tested the solutions suggested by Simon and Thomas on a Linux machine

Re: [Rd] Interrupting C++ code execution

2011-04-25 Thread Simon Urbanek
On Apr 25, 2011, at 11:09 AM, schattenpfla...@arcor.de wrote: Thank you for your response, Simon. 1. Calling R_CheckUserInterrupt() interrupts immediately, so I have no possibility to exit my code gracefully. In particular, I suppose that objects created on the heap (e.g., STL containers)

Re: [Rd] Interrupting C++ code execution

2011-04-25 Thread Simon Urbanek
it on the main thread and you should be prepared that it may take some time and may interact with the OS... Cheers, Simon On Apr 25, 2011, at 12:23 PM, Simon Urbanek wrote: On Apr 25, 2011, at 11:09 AM, schattenpfla...@arcor.de wrote: Thank you for your response, Simon. 1. Calling

[Rd] using autoconf in packages [Was: Question on 5.6 Interfacing C++ code]

2011-04-22 Thread Simon Urbanek
On Apr 22, 2011, at 3:22 PM, Sharpie wrote: smcguffee wrote: Hi Charlie, Thanks for the help, I think some of my story of having been reading the documentation and playing with examples for weeks has gotten lost in the switch of threads. I think most of that confusion also comes

Re: [Rd] How to get R to compile with PNG support

2011-04-21 Thread Simon Urbanek
On Apr 21, 2011, at 9:51 AM, Karl-Dieter Crisman wrote: Thanks for your replies, Dirk and Matt. On Thu, Apr 21, 2011 at 7:49 AM, Dirk Eddelbuettel e...@debian.org wrote: On 20 April 2011 at 12:16, Karl-Dieter Crisman wrote: | | | R is now configured for i686-pc-linux-gnu |

Re: [Rd] FW: [Rcpp-devel] Question on 5.6 Interfacing C++ code

2011-04-21 Thread Simon Urbanek
On Apr 21, 2011, at 10:52 AM, Sean Robert McGuffee wrote: Thanks, That's great, but I don't know how to determine what foo is. It's the name of your package. How do I declare the name of the package? in DESCRIPTION: Package: name and the directory of your package has to have the same

<    3   4   5   6   7   8   9   10   11   12   >