Re: [Rd] suggest that as.double( something double ) not make a copy

2012-06-06 Thread Henrik Bengtsson
Check if this is the same as what was done in R v2.6.0 (2007) - from http://cran.r-project.org/bin/windows/base/old/2.6.0/NEWS.R-2.6.0: o as.vector() and the default methods of as.character(), as.complex(), as.double(), as.expression(), as.integer(), as.logical() and as.raw()

Re: [Rd] suggest that as.double( something double ) not make a copy

2012-06-06 Thread Matthew Dowle
Tim Hesterberg gmail.com> writes: > I've been playing with passing arguments to .C(), and found that replacing > as.double(x) > with > if(is.double(x)) x else as.double(x) > saves time and avoids one copy, in the case that x is already double. > > I suggest modifying as.double to avoid t

Re: [Rd] suggest that as.double( something double ) not make a copy

2012-06-06 Thread Simon Urbanek
On Jun 6, 2012, at 6:53 PM, Tim Hesterberg wrote: > I've been playing with passing arguments to .C(), and found that replacing >as.double(x) > with >if(is.double(x)) x else as.double(x) > saves time and avoids one copy, in the case that x is already double. > No, it doesn't: > x=rnorm(1

[Rd] suggest that as.double( something double ) not make a copy

2012-06-06 Thread Tim Hesterberg
I've been playing with passing arguments to .C(), and found that replacing as.double(x) with if(is.double(x)) x else as.double(x) saves time and avoids one copy, in the case that x is already double. I suggest modifying as.double to avoid the extra copy and just return x, when x is already

Re: [Rd] 7 arguments passed to .Internal(identical) which requires 6

2012-06-06 Thread peter dalgaard
FYI, Brian has backed out the changes to identical() in r59533 of R-patched. Please retry your test codes with the new version. (Due to some ISP mess-up, Brian is temporarily unable to reply in detail himself.) -pd On Jun 6, 2012, at 20:29 , wrote: > On Wed, 6 Jun 2012, Matthew Dowle wrote

Re: [Rd] 7 arguments passed to .Internal(identical) which requires 6

2012-06-06 Thread luke-tierney
On Wed, 6 Jun 2012, Matthew Dowle wrote: Dan Tenenbaum fhcrc.org> writes: I know this has come up before on R-help (http://r.789695.n4.nabble.com/7-arguments-passed-to-Internal-identical-which- requires-6-td4548460.html) but I have a concise reproducible case that I wanted to share. Also,

Re: [Rd] 7 arguments passed to .Internal(identical) which requires 6

2012-06-06 Thread Matthew Dowle
Dan Tenenbaum fhcrc.org> writes: > > I know this has come up before on R-help > (http://r.789695.n4.nabble.com/7-arguments-passed-to-Internal-identical-which- requires-6-td4548460.html) > but I have a concise reproducible case that I wanted to share. > > Also, please note the Bioconductor scena

Re: [Rd] problem in compililng c code using R CMD SHLIB

2012-06-06 Thread Prof Brian Ripley
On 06/06/2012 18:12, Joshua Ulrich wrote: On Wed, Jun 6, 2012 at 8:20 AM, Simon Urbanek wrote: On Jun 6, 2012, at 6:16 AM, Arathy Ram wrote: Hello all, I was trying to compile a simple C program hello.c using R CMD SHLIB hello.c. MY R software residing in C:\Program Files\R\R-2.15.0, and al

Re: [Rd] problem in compililng c code using R CMD SHLIB

2012-06-06 Thread Joshua Ulrich
On Wed, Jun 6, 2012 at 8:20 AM, Simon Urbanek wrote: > > On Jun 6, 2012, at 6:16 AM, Arathy Ram wrote: > >> Hello all, >> I was trying to compile a simple C program hello.c using R CMD SHLIB >> hello.c. >> MY R software residing in C:\Program Files\R\R-2.15.0, and also I have >> downloaded the Rto

[Rd] stumped on re-building package vignette

2012-06-06 Thread Michael Friendly
[Env: Win Xp / StatET 2.0 / R 2.15.0] In my heplots package I extended the HE-examples.Rnw vignette under inst/doc. The package passes R CMD check on my machine: * using log directory 'C:/eclipse-3.7/heplots.Rcheck' * using R version 2.15.0 (2012-03-30) * using platform: i386-pc-mingw32 (32-bi

Re: [Rd] problem in compililng c code using R CMD SHLIB

2012-06-06 Thread Simon Urbanek
On Jun 6, 2012, at 6:16 AM, Arathy Ram wrote: > Hello all, > I was trying to compile a simple C program hello.c using R CMD SHLIB > hello.c. > MY R software residing in C:\Program Files\R\R-2.15.0, and also I have > downloaded the Rtools 2.15.0 and it is in C:\Rtools, MY file(hello.c) is in > E:\

[Rd] tcltk wish: Add tclObj.raw method for converting raw vectors to tclObj

2012-06-06 Thread Charlie Friedemann
Greetings, I have submitted a bug report / wish to the R Bug tracker (https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14939), but I'd like to make this request here as well. Essentially, I was wondering if it would be possible to add another c routine to be called by as.TclObj for raw vect

[Rd] problem in compililng c code using R CMD SHLIB

2012-06-06 Thread Arathy Ram
Hello all, I was trying to compile a simple C program hello.c using R CMD SHLIB hello.c. MY R software residing in C:\Program Files\R\R-2.15.0, and also I have downloaded the Rtools 2.15.0 and it is in C:\Rtools, MY file(hello.c) is in E:\R_dir. I have followed the procedures given below 1. In a ne