[Rd] sum() vs cumsum() implicit type coercion

2020-08-23 Thread Rory Winston
Hi I noticed a small inconsistency when using sum() vs cumsum() I have a char-based series > tryjpy$long [1] "0.0022" "-0.0002" "-0.0149" "-0.0023" "-0.0342" "-0.0245" "-0.0022" [8] "0.0003" "-0.0001" "-0.0004" "-0.0036" "-0.001" "-0.0011" "-0.0012" [15] "-0.0006" "0.0016" "0.0006" W

Re: [Rd] load/unload segfault puzzle

2013-06-13 Thread Rory Winston
or(shift in (0:3)*16) { ># nibble <- as.integer(as.hexmode(substring(s, n-3, n))) >nibble <- as.integer(sapply(substring(s, n-3, n), as.hexmode)) >n <- n - 4 >acc <- acc + 2^shift * nibble >} >acc >} >

Re: [Rd] load/unload segfault puzzle

2013-06-13 Thread Rory Winston
Ben Have you compiled R form source yourself? If so, I would be tempted to mark up memory. c with some debug log statements - especially around line 1357, and possibly inside the finalizers function as it attempts to run the C finalizersnot pretty I know, but may be the quickest approach to

Re: [Rd] Creating a Factor Object in C code?

2012-12-27 Thread Rory Winston
Hi Simon Thanks for the clarification - makes sense and I now think youre right - probably better to avoid an automatic factor conversion and let the user explicitly convert if necessary. And you are right, I did abuse the term factor when referring to varchar - instead of factor, I really mean

[Rd] Creating a Factor Object in C code?

2012-12-27 Thread Rory Winston
Hi guys I am currently working on a small bit of bridging code between a database system and R. The database system has the concept of varchars, a la factors in R, as distinct from plain character strings. What I would like to do is when I receive a list of character strings from the remote dat

Re: [Rd] Handle RAWSXP in inspect.c:typename()

2010-08-23 Thread Rory Winston
Hi Simon Thanks a lot - thats fantastic. Many thanks for the quick response! Cheers -- Rory On Tue, Aug 24, 2010 at 3:12 AM, Simon Urbanek wrote: > > On Aug 22, 2010, at 4:47 AM, Rory Winston wrote: > > > Hi all > > > > I had written a gdb macro to dump the string r

[Rd] Handle RAWSXP in inspect.c:typename()

2010-08-22 Thread Rory Winston
Hi all I had written a gdb macro to dump the string representation of an SEXPREC type when I realised everything I needed was in inspect.c already in the typename() function. However, the typename function doesnt handle the RAWSXP type, so if possible, could the following patch be applied (I've ju

Re: [Rd] Error Building R + X11 on SuSe 10S

2009-08-10 Thread rory . winston
Thanks Duncan. I have since found that building cairo and adding '--with-cairo' to the configure command solves this problem, and also gives (at least to my eyes) much nicer looking 2D png() plots. Cheers -- Rory On Aug 10, 2009 12:54pm, Duncan Murdoch wrote: > rory.wins...@gmail.com wrote:

Re: [Rd] Error Building R + X11 on SuSe 10S

2009-08-10 Thread rory . winston
Following on... Sorry folks, it looks like I have misdiagnosed the issue. When I connect to the server using an X client and start up the newly built R instance, I see capabilities() shows X11 support as expected. So this changes the character of my query somewhat: As I was hoping to run R in

[Rd] Error Building R + X11 on SuSe 10

2009-08-10 Thread rory . winston
Hi all I am having problems building R + x11 support on the following system: # uname -a Linux 2.6.16.60-0.27-bigsmp #1 SMP Mon Jul 28 13:06:32 UTC 2008 i686 i686 i386 GNU/Linux # cat /etc/SuSE-release SUSE Linux Enterprise Server 10 (i586) VERSION = 10 PATCHLEVEL = 2 I am using the source do

[Rd] Duplicated lines in configure

2009-08-10 Thread rory . winston
Hi There seems to be two functionally equivalent lines in the configure script https://svn.r-project.org/R/trunk/configure: ... --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-x use the X Window System --with-gnu-ld assume the C compiler uses GNU ld default=no ... These see

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread rory . winston
t; "VG" == Vincent Goulet <[EMAIL PROTECTED]> >>>>> on Tue, 08 Apr 2008 09:28:00 -0400 writes: VG> Le dim. 6 avr. à 07:01, Rory Winston a écrit : >> Hi Martin >> >> Thanks for the detailed reply. I had a look at the mat

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Rory Winston
(INTSXP, 2)); INTEGER(dims2)[0] = nrows; INTEGER(dims2)[1] = ncols; setAttrib(matrix, R_DimSymbol, dims2); UNPROTECT(5); return matrix; } On Sun, Apr 6, 2008 at 12:01 PM, Rory Winston <[EMAIL PROTECTED]> wrote: > Hi Martin > > Thanks for the detailed reply. I had a

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Rory Winston
nion on this? Thanks Rory On Sat, Apr 5, 2008 at 6:52 PM, Martin Maechler <[EMAIL PROTECTED]> wrote: > >>>>> "RW" == Rory Winston <[EMAIL PROTECTED]> > >>>>> on Sat, 5 Apr 2008 14:44:44 +0100 writes: > >RW> Hi all I recently star

Re: [Rd] Adding a Matrix Exponentiation Operator

2008-04-08 Thread Rory Winston
Thanks Antonio, thats a good suggestion. On Sat, Apr 5, 2008 at 5:51 PM, Antonio, Fabio Di Narzo < [EMAIL PROTECTED]> wrote: > 2008/4/5, Rory Winston <[EMAIL PROTECTED]>: > > > > > /* Convenience function */ > > static void copyMatrixData(SEXP a, SEXP

[Rd] Adding a Matrix Exponentiation Operator

2008-04-05 Thread Rory Winston
Hi all I recently started to write a matrix exponentiation operator for R (by adding a new operator definition to names.c, and adding the following code to arrays.c). It is not finished yet, but I would like to solicit some comments, as there are a few areas of R's internals that I am still feelin