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

2011-07-12 Thread Simon Urbanek
Never mind, I found the issue - contrary to the documentation Linux does modify tv in the call to select() so our measure of elapsed time doesn't increase. Work-around now present in R-devel. Cheers, Simon On Jul 12, 2011, at 5:23 PM, Simon Urbanek wrote: > > On Jul 12, 2011,

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 do

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" 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 flo

[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 (an

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] 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

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 war

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: libg

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 wrote:

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 s

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 s

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 read

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 flo

[Rd] OpenCL [Was: Tesla GPUs]

2011-08-08 Thread Simon Urbanek
le 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,

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

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: >

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 besid

Re: [Rd] Licensing Issue with JRI

2011-08-25 Thread Simon Urbanek
he choice to use it and it's just a matter of the license of the implementation of that API that you use. Cheers, Simon > > On Thu, Aug 25, 2011 at 8:24 AM, Simon Urbanek > wrote: >> >> On Aug 19, 2011, at 10:26 PM, Lokkju Brennr wrote: >> >>> Hoping someone can

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 inv

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 R-2.13.1/

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 R-2.13.1/s

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

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)) > minc<-as.numeric(substr(da

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 >>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' > >> Traceb

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 subjec

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 >&

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,

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 qt

Re: [Rd] Building R package with precompiled shared library

2011-09-14 Thread Simon Urbanek
On Sep 14, 2011, at 9:52 AM, Paul Gilbert wrote: > My understanding is that this cannot be done, for both licence and security > reasons. The package build expects source code and removes binaries. You can > link with binaries that are provided separately from the package, possibly > coming fro

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 p

Re: [Rd] Revision of shell.exec?

2011-09-14 Thread Simon Urbanek
R-installation, which somehow accesses the file system to > find the default program to for a certain file type. I am guessing this > little beauty is the engine of "shell.exec". > > (An honest) cheers, > Brian > > On 9/14/2011 7:49 PM, Simon Urbanek wrote: >>

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 tha

Re: [Rd] External pointers and an apparent memory leak

2011-09-15 Thread Simon Urbanek
Jim, On Sep 14, 2011, at 5:21 PM, James Bullard wrote: > I'm using external pointers and seemingly leaking memory. My determination of > a memory leak is that the R process continually creeps up in memory as seen > by top while the usage as reported by gc() stays flat. I have isolated the C >

Re: [Rd] External pointers and an apparent memory leak

2011-09-15 Thread Simon Urbanek
98== 135,792 bytes in 69 blocks are possibly lost in loss record 1,832 > of 1,858 > ==22098==at 0x4C274A8: malloc (vg_replace_malloc.c:236) > ==22098==by 0x4F5D799: GetNewPage (memory.c:786) > ==22098==by 0x4F5EE6F: Rf_allocVector (memory.c:2330) > ==22098==by 0x4F6007F:

Re: [Rd] grep problem in R-devel 2.14 r57004

2011-09-16 Thread Simon Urbanek
Mark, quick googling gives the answer - [.] is not what you think it is, you probably meant [\.]. Bracket expressions starting with [. are collating symbols which is unsupported by PCRE (only [:xxx:] is supported, neither [=xxx=] nor [.xxx.] is) but that's probably not what you intended. See POS

Re: [Rd] grep problem in R-devel 2.14 r57004

2011-09-16 Thread Simon Urbanek
comment on what happened. I have ported that fix into R-devel. Cheers, Simon On Sep 16, 2011, at 9:01 AM, Simon Urbanek wrote: > Mark, quick googling gives the answer - [.] is not what you think it is, you > probably meant [\.]. Bracket expressions starting with [. are collating >

Re: [Rd] R license for a derived data-only package

2011-09-16 Thread Simon Urbanek
On Sep 16, 2011, at 10:32 AM, Michael Friendly wrote: > I'm looking for guidance or advice about the R license to use in preparing a > package containing the > Baseball Database from http://baseball1.com/statistics/ > My main purpose is to make it available to students in a course, and to > deve

Re: [Rd] cbind() crashes on raw vectors

2011-09-25 Thread Simon Urbanek
Thanks, now fixed. Simon On Sep 23, 2011, at 4:46 PM, Hervé Pagès wrote: > Hi, > > cbind() doesn't seem to like raw vectors: > > > df <- cbind(a=integer(4000), b=raw(4000)) > > df > *** glibc detected *** /home/hpages/R-2.13.1/bin/exec/R: malloc(): memory > corruption: 0x02d73ca0 ***

Re: [Rd] grep and PCRE fun

2011-09-30 Thread Simon Urbanek
Jeff, this is really a bug in PCRE since the length (0) is a multiple of 3 as documented so PCRE should not be writing anything. Anyway, this has been now fixed (by Brian). Cheers, Simon On Sep 29, 2011, at 5:00 PM, Jeffrey Horner wrote: > Hello, > > I think I've found a bug in the C functi

Re: [Rd] Increase transparency: suggestion on how to avoid namespaces and/or unnecessary overwrites of existing functions

2011-10-01 Thread Simon Urbanek
On Oct 1, 2011, at 6:14 PM, Duncan Murdoch wrote: > On 11-10-01 5:14 PM, Dominick Samperi wrote: >> On Sat, Oct 1, 2011 at 1:08 PM, Duncan Murdoch >> wrote: >>> On 11-08-23 2:23 PM, Janko Thyson wrote: aDear list, I'm aware of the fact that I posted on something related a

Re: [Rd] Increase transparency: suggestion on how to avoid namespaces and/or unnecessary overwrites of existing functions

2011-10-01 Thread Simon Urbanek
On Oct 1, 2011, at 7:52 PM, Joshua Wiley wrote: > On Sat, Oct 1, 2011 at 3:14 PM, Duncan Murdoch > wrote: >> On 11-10-01 5:14 PM, Dominick Samperi wrote: > [snip] >>> Except that namespace::foo should be assigned to another local >>> variable instead of using package::foo in a tight loop, becau

Re: [Rd] number of copies

2011-10-03 Thread Simon Urbanek
Terry, On Oct 3, 2011, at 10:32 AM, Terry Therneau wrote: > I'm looking at memory efficiency for some of the survival code. The > following fragment appears in coxph.fit >coxfit <- .C("coxfit2", iter=as.integer(maxiter), > as.integer(n), > as.integer(nvar)

Re: [Rd] number of copies

2011-10-03 Thread Simon Urbanek
On Oct 3, 2011, at 2:43 PM, Terry Therneau wrote: > > On Mon, 2011-10-03 at 12:31 -0400, Simon Urbanek wrote: >>> Thanks. I was hoping that x[,sorted] would act like "double(n)" >> does in a .C call, and have no extra copies made since it has no local >> a

Re: [Rd] Is there a way to disable / warn about forking?

2011-10-04 Thread Simon Urbanek
On Oct 4, 2011, at 4:43 AM, Thomas Friedrichsmeier wrote: > Dear R developers, > > with the inclusion of the package "parallel" in the upcoming release of R, > users and package developers are likely to make increasing usage of > parallelization features. In part, these features rely on forkin

Re: [Rd] segfault after .C call.

2011-10-04 Thread Simon Urbanek
The bug is in your code! (I see at least one - many buffer overflows in all char** output arguments). Please don't abuse the bug tracking system for usage questions. You may want to consider using either .Call (if you are familiar with R) or Rcpp (if you are more familiar with C++), .C is not th

Re: [Rd] suppressing stderr output from system() calls

2011-10-05 Thread Simon Urbanek
See ?system, in particular ignore.stdout, ignore.stderr and intern. Cheers, Simon On Oct 5, 2011, at 5:36 AM, Mark Cowley wrote: > Dear list, > I'm trying to suppress/redirect/squash the output from commands like > install.packages, or download.file. The problem is that none of: sink(..., > t

Re: [Rd] MetaCran website v1.0.0-alpha

2015-05-25 Thread Simon Urbanek
One issue I have with this is that it doesn't point to the original GitHub repositories of the packages, so you end up with additional repositories on Github in Gabor's name that have nothing to do with the actual Github repositories of the packages. I understand that it's technically necessary,

Re: [Rd] Why my messages are filtered from the list?

2015-05-29 Thread Simon Urbanek
On May 29, 2015, at 1:05 AM, Ivan Popivanov wrote: > Now I am getting confused. I see two postings from me in the archives: > > https://stat.ethz.ch/pipermail/r-devel/2015-May/071205.html > https://stat.ethz.ch/pipermail/r-devel/2015-April/070982.html > > Were these actually published to the l

Re: [Rd] CRAN testing

2015-06-12 Thread Simon Urbanek
> On Jun 12, 2015, at 1:24 AM, Mick Jordan wrote: > > Is the mechanism by which packages are tested on CRAN described > anywhere? Is it by any chance written in R? The FastR > team is interested in > running a virtual CRAN where we can test all the

Re: [Rd] Multi-line comments in R

2015-08-19 Thread Simon Urbanek
https://stat.ethz.ch/pipermail/r-help//2009-February/381039.html > On Aug 19, 2015, at 12:16 AM, Nathan Esau wrote: > > I was wondering why the decision was made long ago to never implement > multi-line comments in R. I feel there are several argument to be made for > why the R language should

Re: [Rd] Child thread libR.so

2015-08-24 Thread Simon Urbanek
Ryan, if you read the piece you quoted from more carefully, you'll notice it says "Rf_initialize_R" - which is quite critical in this matter. Cheers, Simon On Aug 24, 2015, at 9:18 AM, Ryan C Metzger wrote: > I did some poking around with GDB and confirmed that the advice of > setting R_CSta

Re: [Rd] Web apps on a R server

2015-08-24 Thread Simon Urbanek
On Aug 24, 2015, at 4:28 AM, arnaud gaboury wrote: > I want to deploy some R web apps with a clean separate of concerns: R > code // applications. > > My choice for the R part is to use one of these two tools: > - deployR[1] > - OpenCPU[2] > > and JavaScript for web apps. > > OS is Fedora 22 a

Re: [Rd] mclapply memory leak?

2015-09-03 Thread Simon Urbanek
Toby, > On Sep 2, 2015, at 1:12 PM, Toby Hocking wrote: > > Dear R-devel, > > I am running mclapply with many iterations over a function that modifies > nothing and makes no copies of anything. It is taking up a lot of memory, > so it seems to me like this is a bug. Should I post this to > bugs

Re: [Rd] Optimization bug when byte compiling with gcc 5.2.0 on windows

2015-09-14 Thread Simon Urbanek
Jeroen, the difference is that level 3 is using the internal implementation of sqrt in the compiler instead of calling the sqrt function. The internal path goes to R_sqrt which is defined as # define R_sqrt(x) (ISNAN(x) ? x : sqrt(x)) so you could check if that is where the problem happens. It

Re: [Rd] Long vectors: Missing values and R_xlen_t?

2015-09-21 Thread Simon Urbanek
On Sep 20, 2015, at 3:06 PM, Henrik Bengtsson wrote: > Is there a missing value constant defined for R_xlen_t, cf. NA_INTEGER > (== R_NaInt == INT_MIN) for int(eger)? If not, is it correct to > assume that missing values should be taken care/tested for before > coercing from int or double? >

Re: [Rd] Hidden files problem in R CMD check

2015-09-26 Thread Simon Urbanek
Christian, those are resource forks from your files - possibly maintained by your (likey very old?) editor. First, is seems that you are not creating the tar ball correctly - the correct way is to use R CMD build which should not include resource forks nor files on the ignore list. That said,

Re: [Rd] Hidden files problem in R CMD check

2015-09-26 Thread Simon Urbanek
On Sep 26, 2015, at 5:06 PM, cstrato wrote: > Dear Dirk, > > Yes, I know, however forget for one moment R. > > If I use tar independent of R it still should not create these hidden files. > > BTW, do you know where these hidden files are stored on the Mac? > Please consider reading my origi

Re: [Rd] authorship and citation

2015-10-05 Thread Simon Urbanek
On Oct 5, 2015, at 6:31 PM, Uwe Ligges wrote: > > > On 05.10.2015 23:47, Andrew Robinson wrote: >> As a fourth option, I wonder if the first author could fork the package? >> >> Presumably, appropriately cited, a fork is permitted by the license under >> which it was released. Then the origin

Re: [Rd] authorship and citation

2015-10-06 Thread Simon Urbanek
On Oct 6, 2015, at 7:58 AM, S Ellison wrote: >> The former co-author contributed, so he is still author and probably >> copyright >> holder and has to be listed among the authors, otherwise it would be a CRAN >> policy violation ... > > It's a bit of a philosophical question right now, but at

Re: [Rd] Package integrity check via SHA256 or OpenPGP possible?

2015-10-15 Thread Simon Urbanek
FWIW PKI supports signing and verification of tar balls based on X.509 (PKI.sign.tar/PKI.verify.tar) - the aim was to specifically support signing of packages so we could have infrastructure akin to the Apple developer code signing where the repository would be the CA (e.g., CRAN, RForge.net, et

Re: [Rd] R_MakeExternalPtr 'tag' argument

2015-11-14 Thread Simon Urbanek
On Nov 13, 2015, at 3:58 PM, William Dunlap wrote: > Most packages that use the R_MakeExternalPtr function use > Rf_install("pkgSpecificString") for its 'tag' argument (if they don't use > R_NilValue). A few use Rf_mkChar("pkgSpecificString"). > > Is there any reason to prefer one over the oth

Re: [Rd] Custom C finalizers for .Call

2015-11-25 Thread Simon Urbanek
Jeroen, I agree that it may be useful to have some kind of "finally"-like infrastructure. However, in the use cases you list there are already ways to do that - the same way that R_alloc uses. First, you don't need to call UNPROTECT - the whole point is that the protection stack is automaticall

Re: [Rd] How to efficiently share data (a dataframe) between R and Java

2015-12-06 Thread Simon Urbanek
On Dec 6, 2015, at 12:36 PM, Ing. Jaroslav Kuchař wrote: > Dear all, > > in our ongoing project we use Java implementations of several > algorithms. We also provide a “wrapper” implemented as an R package > using rJava (https://github.com/jaroslav-kuchar/rCBA). Based on our > recent experiments

Re: [Rd] How to efficiently share data (a dataframe) between R and Java

2015-12-15 Thread Simon Urbanek
oriented) in Java - that is much faster >> than any kind of serialization or anything you mention above since you >> pass the variables as a whole. > > Could you please send any reference to more examples or documentation > that can help me? > The main goal is to copy a

Re: [Rd] Assistance much appreciated

2015-12-17 Thread Simon Urbanek
Michael, I got access to PDP AIX so I can try to replicate your problem. Can you, please, share exactly your setup - AIX version and well as how exactly you installed the compilers (=where from)? I can then try to replicate it. AFAICS there is no official binary for gfortran nor gcc 4.7 so it m

Re: [Rd] Assistance much appreciated

2015-12-17 Thread Simon Urbanek
FWIW I was able to replicate the problem using AIX7.1 on Power8, R 3.2.3, vac/xlc 11.1, xlf 13.1 in 64-bit mode. Indeed, Peter's analysis is correct re_regexecb(®line, line..) returns REG_NOMATCH even though the string is literally "Package: tools" - no special characters anywhere. On Dec 17, 2

Re: [Rd] R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"

2016-01-01 Thread Simon Urbanek
Michael, thanks, I'll have a look once my PDP VMs are up again (later today). This may be a signedness issue although it's unclear why other platforms wouldn't be affected. Cheers, Simon On Dec 31, 2015, at 10:14 AM, Michael Felt wrote: > On 2015-12-30 09:58, Michael Felt wrote: >> On 2015-

Re: [Rd] R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"

2016-01-01 Thread Simon Urbanek
suitable for comparisons etc. On other platforms wint_t is unsigned so it works. Manually defining tre_cint_t to unsigned int fixes the issue. Cheers, Simon On Jan 1, 2016, at 12:20 PM, Simon Urbanek wrote: > Michael, > > thanks, I'll have a look once my PDP VMs are up again (late

Re: [Rd] R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"

2016-01-03 Thread Simon Urbanek
nges to configure(.ac) so maybe my problems are > self-inflicted. But would be good to know what environment you are using. > > Thanks for looking - and finding!!! > > Michael >>> On 01 Jan 2016, at 22:06 , Simon Urbanek >>> wrote: >>> >>> Ok,

Re: [Rd] R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"

2016-01-04 Thread Simon Urbanek
etween ushort and int. > Not really - it doesn't care about short at all - note that the short typedef is never actually used on AIX since it has wchar support so TRE is only using int. Cheers, Simon > Michael > > On 04-Jan-16 01:26, Simon Urbanek wrote: >> Michael, &g

Re: [Rd] JDataFrame API

2016-01-15 Thread Simon Urbanek
Tom, this may be good for embedding small data sets, but for practical purposes is doesn't seem like the most efficient solution. Since you didn't provide any code, I built a test case using the build-in Java JSON API to build a medium-sized dataset (1e6 rows) and read it in just to get a ball

Re: [Rd] JDataFrame API

2016-01-15 Thread Simon Urbanek
icient, but you'd probably have to write the wrapper for that yourself (annoyingly, the default Java methods use big-endian format which is slower on most machines). But then, you're right that for Tomcat applications the sizes are small enough that using JSON has the benefit that you

Re: [Rd] Wrong config check for __libc_stack_end

2016-02-01 Thread Simon Urbanek
On Feb 1, 2016, at 4:16 AM, Martin Maechler wrote: >> Alba Pompeo >>on Fri, 29 Jan 2016 08:23:26 -0200 writes: > >> Here is my log from 'make check' using an Intel i5 64-bit >> processor - http://pastebin.com/raw/N6SYAuFX Here is >> Isaac's log from 'make check' using an Intel Atom

Re: [Rd] Wrong config check for __libc_stack_end

2016-02-01 Thread Simon Urbanek
hink? Is there anything else I can do to help solve this issue? > > > > On Mon, Feb 1, 2016 at 11:36 AM, Simon Urbanek > wrote: >> >> On Feb 1, 2016, at 4:16 AM, Martin Maechler >> wrote: >> >>>>>>>> Alba Pompeo >>>&g

Re: [Rd] Wrong config check for __libc_stack_end

2016-02-01 Thread Simon Urbanek
d with recommended packages. Cheers, Simon > Ran make. > Ran make check. Log is here - http://pastebin.com/raw/cGJgqB8p > > What do you think? Is there anything else I can do to help solve this issue? > > > > On Mon, Feb 1, 2016 at 11:36 AM, Simon Urbanek > wrote: >

Re: [Rd] Wrong config check for __libc_stack_end

2016-02-01 Thread Simon Urbanek
On Feb 1, 2016, at 12:32 PM, Martin Maechler wrote: >>>>>> Simon Urbanek >>>>>>on Mon, 1 Feb 2016 08:36:56 -0500 writes: > >> On Feb 1, 2016, at 4:16 AM, Martin Maechler >> wrote: > > [..] > >>> Ba

Re: [Rd] [musl] strptime() question

2016-02-04 Thread Simon Urbanek
On Feb 4, 2016, at 11:20 AM, Alba Pompeo wrote: > There is incompatibility between R strptime and musl libc. I posted > about it on their mailing list, but they need more information I can't > provide, so I'm forwarding the message here in hope R developers can > help. Thanks. > Generally, it'

Re: [Rd] Sys.readlink (on BSD vs Linux)

2016-02-29 Thread Simon Urbanek
> On Feb 29, 2016, at 5:59 AM, Sven Templer wrote: > > Hello, > > sorry for not being clear enough. > > My problem is represented with the following code, running on OSX: > > mkdir ~/test > ln -s ~/test ~/testlink > touch ~/test/foo > Rscript -e 'Sys.readlink(c("~/test/foo", "~/testlink/foo")

Re: [Rd] ALLOCATE in a FORTRAN subroutine

2016-03-08 Thread Simon Urbanek
On Mar 8, 2016, at 6:57 AM, MAURICE Jean - externe wrote: >> You can call (some) R functionality from C > When I read about 'R api' I thought that we could call all the functionality > of R. I think that in the windows world, this is called OLE automation. From > a pure programmer point of vi

Re: [Rd] r-bugzilla maintainer?

2016-04-30 Thread Simon Urbanek
I'm running the site although all R-core members are technically admins. I'll follow up privately in a separate e-mail. Cheers, Simon On Apr 30, 2016, at 7:13 PM, Ben Bolker wrote: > > I'm curious if anyone has suggestions for reaching the maintainer of > https://bugs.r-project.org/bugzill

Re: [Rd] R-3.2.5 Mac OS X package

2016-05-03 Thread Simon Urbanek
On May 3, 2016, at 10:40 AM, Mick Jordan wrote: > On 5/2/16 4:25 PM, David Winsemius wrote: >>> On May 2, 2016, at 3:45 PM, Mick Jordan wrote: >>> >>> When is the R-3.2.5 binary for Mac OS X likely to show up? >> Where did you look? I see both Mavericks and SnowLeopard fork binaries with >> o

Re: [Rd] R process killed when allocating too large matrix (Mac OS X)

2016-05-04 Thread Simon Urbanek
On May 3, 2016, at 9:51 PM, Marius Hofert wrote: > Dear expeRts, > > The following code leads to R being killed (under Mac OS X 10.11.4; R > installed from source; also happened under a previous unstable > version): > > m <- matrix(0, 10, 10) > > I expected an error that a vector of t

Re: [Rd] R process killed when allocating too large matrix (Mac OS X)

2016-05-04 Thread Simon Urbanek
On May 4, 2016, at 6:14 PM, Marius Hofert wrote: >> Can you elaborate on "leads to R being killed"? You should tell to the >> killer not to do it again :). > > Hi Simon! > > Sure, but who do you tell it if you don't know the killer? > This is all the killer left me with, the 'crime scene' if

Re: [Rd] R process killed when allocating too large matrix (Mac OS X)

2016-05-04 Thread Simon Urbanek
; memory usage, swap space size etc. There are slightly more involved ways to query the VM system as well, but I'm not sure I'd want to go so deep into the weeds, especially since this becomes quickly highly OS-specific. Cheers, Simon > Thanks & cheers, > Marius > &g

Re: [Rd] R process killed when allocating too large matrix (Mac OS X)

2016-05-04 Thread Simon Urbanek
all correctly in my case the kill happened in copyVector() -> duplicate(), so it was not necessarily on the initial allocation but rather further down the line. Cheers, Simon > H. > > On 05/04/2016 06:21 PM, Simon Urbanek wrote: >> >> On May 4, 2016, at 9:00 PM, Marius H

Re: [Rd] Single-threaded aspect

2016-05-12 Thread Simon Urbanek
As others said XPtr is not something in R so Rcpp mailing list would be the right place for that aspect. However, it you forget Rcpp and phrase it as an R question, you also get much closer to the reason and answer. SEXP type is the internal representation of all objects in R. I assume your que

Re: [Rd] R external pointer and GPU memory leak problem

2016-05-16 Thread Simon Urbanek
Yuan, AFAICS things are all working as designed. If everything gets collected properly after a gc() then your finalizers are correct. You have to remember that R relies on garbage collection the release memory so only when R requires more memory it will run a garbage collection. The problem wit

Re: [Rd] R without graphics

2016-05-23 Thread Simon Urbanek
Um... any reason why you don't simply disable aqua? That file is only compiled if you enable aqua - it has really nothing to do with grDevices ... On May 23, 2016, at 7:44 PM, Mick Jordan wrote: > Is it possible to configure and build an R without any graphics support. I..e > no grDevices or g

Re: [Rd] String encoding problem

2016-07-07 Thread Simon Urbanek
> On Jul 7, 2016, at 11:40 AM, Hadley Wickham wrote: > > On Thu, Jul 7, 2016 at 10:11 AM, Duncan Murdoch > wrote: >> On 07/07/2016 10:57 AM, Hadley Wickham wrote: >>> >>> If you print: >>> >>> "\xc9\x82\xbf" >>> >>> you get >>> >>> "\u0242\xbf" >>> >>> But if you try and evaluate that stri

Re: [Rd] mcparallel / mccollect

2016-08-30 Thread Simon Urbanek
Michel, thanks, you're right, that the list should have names. Your patch has the match() part backwards, but is otherwise the right idea. I have committed a variant in R-devel and will back-port later. Thanks, Simon > On Aug 30, 2016, at 8:43 AM, Michel Lang wrote: > > Hi there, > > I've

Re: [Rd] Web site for MacOSX R-devel precompiled version

2016-09-29 Thread Simon Urbanek
> On Sep 29, 2016, at 8:42 AM, Marc Girondot via R-devel > wrote: > > From several years, I used this site http://r.research.att.com to get a > precompiled version of macosx R-devol but the most recent version is frozen > at the 18/8 build (r 71112). > > Is there an alternative (except than

Re: [Rd] Web site for MacOSX R-devel precompiled version

2016-09-29 Thread Simon Urbanek
[Moving to R-SIG-Mac where it belongs] The machine building 10.6 binaries has died and since it was responsible for merging the 10.9 and 10.6 binaries to the website it means neither were published. 10.9 binaries are now up. > On Sep 29, 2016, at 2:09 PM, Simon Urbanek > wrote: >

Re: [Rd] Cluster: Various GCC, how important is consistency?

2016-10-17 Thread Simon Urbanek
There are many issues with different gcc versions, but they can at least be minimized by using static linking, i.e. you should at the very least use -static-libstdc++ -static-libgcc to make sure you don't mix runtime versions. We run into the same problem since C++11 compilers are rare on produc

Re: [Rd] Parallel compression support for saving to rds/rdata files?

2016-12-15 Thread Simon Urbanek
> On Dec 15, 2016, at 12:08 AM, Kenny Bell wrote: > > Hi, > > I have tried to follow the instructions in the ``save`` documentation and > it doesn't seem to work (see below): > > mydata <- do.call(rbind, rep(iris, 1)) > con <- pipe("pigz -p8 > fname.gz", "wb"); > save(mydata, file = con);

Re: [Rd] Definition of uintptr_t in Rinterface.h

2016-12-29 Thread Simon Urbanek
The problem is elsewhere - Rinterface.h guards the ultima-ratio fallback with HAVE_UINTPTR_T but that config flag is not exported in Rconfig.h. Should be now fixed in R-devel - please check if that works for you. Thanks, Simon > On Dec 26, 2016, at 11:25 PM, Laurent Gautier wrote: > > Hi, >

Re: [Rd] Definition of uintptr_t in Rinterface.h

2017-01-01 Thread Simon Urbanek
> On Jan 1, 2017, at 5:12 PM, Laurent Gautier wrote: > > > > 2017-01-01 8:28 GMT-05:00 Prof Brian Ripley : > On 29/12/2016 15:55, Simon Urbanek wrote: > The problem is elsewhere - Rinterface.h guards the ultima-ratio fallback with > HAVE_UINTPTR_T but that config

Re: [Rd] R Bugzilla down

2017-02-02 Thread Simon Urbanek
Thanks, should be back up. Simon > On Feb 2, 2017, at 6:38 AM, Mikko Korpela wrote: > > The R Bugzilla at is down, for at > least some hours by now. > > The error message from my web browser reads: > > Can't connect to the database. > Error: Can't conn

Re: [Rd] R 3.4 and mclapply assertion failure - is this a bug?

2017-05-02 Thread Simon Urbanek
Yan, this looks like an interaction of OpenMP in data.table and forking - you may want to report that to Matt as he can shed more light on that. He has been complaining that we didn't enable OpenMP before 3.4 so he probably knows about the issue and how to fix it. Cheers, Simon > On May 2, 2

<    1   2   3   4   5   6   7   8   9   10   >