[Rd] SET_NAMED in getattrib0

2013-09-26 Thread Matthew Dowle
Can someone please set me straight on why getattrib0 calls SET_NAMED on the SEXP it returns? For example the line : SET_NAMED(CAR(s), 2); appears near the end of getattrib0 here : https://svn.r-project.org/R/trunk/src/main/attrib.c g

Re: [Rd] helping R-forge build

2013-09-16 Thread Matthew Dowle
On 16/09/13 16:11, Paul Gilbert wrote: (subject changed from Re: [Rd] declaring package dependencies ) ... Yes useful. But that includes a package build system (which is what breaks on R-Forge). If you could do that on a six-pack then could you fix R-Forge on a three-pack first please? The R-For

Re: [Rd] declaring package dependencies

2013-09-16 Thread Matthew Dowle
Ben Bolker wrote : Do you happen to remember what the technical difficulty was? From memory I think it was that CRAN maintainers didn't have access to Uwe's winbuilder machine. But often when I get OK from winbuilder R-devel I don't want it to go to CRAN yet. So procedures and software would ha

Re: [Rd] declaring package dependencies

2013-09-16 Thread Matthew Dowle
On Sep 16, 2013, at 01:46 PM, Brian Rowe wrote: That reminds me: I once made a suggestion on how to automate some of the CRAN deployment process, but it was shot down as not being useful to them. I do recall a quote that was along the lines of "as long as you don't need help, do whatever you wan

Re: [Rd] declaring package dependencies

2013-09-15 Thread Matthew Dowle
I'm a little surprised by this thread. I subscribe to the RSS feeds of changes to NEWS (as Dirk mentioned) and that's been pretty informative in the past : http://developer.r-project.org/RSSfeeds.html Mainly though, I submit to winbuilder before submitting to CRAN, as the CRAN policies advis

Re: [Rd] declaring package dependencies

2013-09-14 Thread Matthew Dowle
I'm a little surprised by this thread. I subscribe to the RSS feeds of changes to NEWS (as Dirk mentioned) and that's been pretty informative in the past : http://developer.r-project.org/RSSfeeds.html Mainly though, I submit to winbuilder before submitting to CRAN, as the CRAN policies advise.

[Rd] C API entry point to currentTime()

2013-03-26 Thread Matthew Dowle
Hi, I used to use currentTime() (from /src/main/datetime.c) to time various sections of data.table C code in wall clock time in sub-second accuracy (type double), consistently across platforms. The consistency across platforms is a really nice feature of currentTime(). But currentTime() isn'

Re: [Rd] double in summary.c : isum

2013-03-25 Thread Matthew Dowle
On 25.03.2013 11:31, Matthew Dowle wrote: On 25.03.2013 11:27, Matthew Dowle wrote: On 25.03.2013 09:20, Prof Brian Ripley wrote: On 24/03/2013 15:01, Duncan Murdoch wrote: On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew

Re: [Rd] double in summary.c : isum

2013-03-25 Thread Matthew Dowle
On 25.03.2013 11:27, Matthew Dowle wrote: On 25.03.2013 09:20, Prof Brian Ripley wrote: On 24/03/2013 15:01, Duncan Murdoch wrote: On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the

Re: [Rd] double in summary.c : isum

2013-03-25 Thread Matthew Dowle
On 25.03.2013 09:20, Prof Brian Ripley wrote: On 24/03/2013 15:01, Duncan Murdoch wrote: On 13-03-23 10:20 AM, Matthew Dowle wrote: On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the following : x = as.integer(2^30-1) [1

Re: [Rd] double in summary.c : isum

2013-03-23 Thread Matthew Dowle
On 23.03.2013 12:01, Prof Brian Ripley wrote: On 20/03/2013 12:56, Matthew Dowle wrote: Hi, Please consider the following : x = as.integer(2^30-1) [1] 1073741823 sum(c(rep(x, 1000), rep(-x,999))) [1] 1073741824 Tested on 2.15.2 and a recent R-devel (r62132). I'm wondering

[Rd] double in summary.c : isum

2013-03-20 Thread Matthew Dowle
Hi, Please consider the following : x = as.integer(2^30-1) [1] 1073741823 sum(c(rep(x, 1000), rep(-x,999))) [1] 1073741824 Tested on 2.15.2 and a recent R-devel (r62132). I'm wondering if s in isum could be LDOUBLE instead of double, like rsum, to fix this edge case? https://sv

Re: [Rd] conflict between rJava and data.table

2013-03-01 Thread Matthew Dowle
On 01.03.2013 20:19, Simon Urbanek wrote: On Mar 1, 2013, at 11:40 AM, Matthew Dowle wrote: On 01.03.2013 16:13, Simon Urbanek wrote: On Mar 1, 2013, at 8:03 AM, Matthew Dowle wrote: Simon Urbanek wrote : Can you elaborate on the details as of where this will be a problem? Packages should

Re: [Rd] conflict between rJava and data.table

2013-03-01 Thread Matthew Dowle
On 01.03.2013 16:13, Simon Urbanek wrote: On Mar 1, 2013, at 8:03 AM, Matthew Dowle wrote: Simon Urbanek wrote : Can you elaborate on the details as of where this will be a problem? Packages should not be affected since they should be importing the namespaces from the packages they use, so

Re: [Rd] conflict between rJava and data.table

2013-03-01 Thread Matthew Dowle
Simon Urbanek wrote : Can you elaborate on the details as of where this will be a problem? Packages should not be affected since they should be importing the namespaces from the packages they use, so the only problem would be in a package that uses both data.table and rJava -- and this is eas

Re: [Rd] Implications of a Dependency on a GPLed Package

2013-01-26 Thread Matthew Dowle
Christian Sigg sigg-iten.ch> writes: > > Dear Marc > > > 2. Can non-GPL compatible packages for R even be created (even if "pure > > R"), based upon the interpretation > of the GPL that Christian has postulated? > > I am not trying to offer my own interpretation of the GPL, which is entirely

Re: [Rd] Implications of a Dependency on a GPLed Package

2013-01-25 Thread Matthew Dowle
Christian, In my mind, rightly or wrongly, it boils down to these four points : 1. CRAN policy excludes closed source packages; i.e., every single package on CRAN includes its C code, if any. If an R package included a .dll or .so which linked at C level to R, and that was being distributed

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On 04.01.2013 15:22, Duncan Murdoch wrote: On 04/01/2013 10:15 AM, Matthew Dowle wrote: On 04.01.2013 14:56, Duncan Murdoch wrote: > On 04/01/2013 9:51 AM, Matthew Dowle wrote: >> On 04.01.2013 14:03, Duncan Murdoch wrote: >> > On 13-01-04 8:32 AM, Matthew Dowle wrote: >>

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On 04.01.2013 14:56, Duncan Murdoch wrote: On 04/01/2013 9:51 AM, Matthew Dowle wrote: On 04.01.2013 14:03, Duncan Murdoch wrote: > On 13-01-04 8:32 AM, Matthew Dowle wrote: >> >> On Fri, Jan 3, 2013, Bert Gunter wrote >>> Well... >>> >>>

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On 04.01.2013 14:03, Duncan Murdoch wrote: On 13-01-04 8:32 AM, Matthew Dowle wrote: On Fri, Jan 3, 2013, Bert Gunter wrote Well... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch anderson.ucla.edu> wrote: Dear R developers---I just spent half a day debugging an R program, which had two b

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On Fri, Jan 3, 2013, Bert Gunter wrote Well... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch anderson.ucla.edu> wrote: Dear R developers---I just spent half a day debugging an R program, which had two bugs---I selected the wrongly named variable, which turns out to have been a scalar, which th

Re: [Rd] Bounty on Error Checking

2013-01-03 Thread Matthew Dowle
Ivo, That's standard R behaviour. But I've had similar bugs as you. If you really want to change it then one way would be to create your own helper function, say strictselect(), or shorter name and ensure to use that instead of [[ and $. Or, how about something like this? : DF = data.frame(a

Re: [Rd] How to ensure -O3 on Win64

2012-12-28 Thread Matthew Dowle
On 28.12.2012 00:41, Simon Urbanek wrote: On Dec 27, 2012, at 6:08 PM, Matthew Dowle wrote: On 27.12.2012 17:53, Simon Urbanek wrote: On Dec 23, 2012, at 9:22 PM, Matthew Dowle wrote: Hi, Similar questions have come up before on the list and elsewhere but I haven't found a solutio

Re: [Rd] How to ensure -O3 on Win64

2012-12-27 Thread Matthew Dowle
On 27.12.2012 17:53, Simon Urbanek wrote: On Dec 23, 2012, at 9:22 PM, Matthew Dowle wrote: Hi, Similar questions have come up before on the list and elsewhere but I haven't found a solution yet. winbuilder's install.out shows data.table's .c files compiled with -O3 on W

[Rd] How to ensure -O3 on Win64

2012-12-23 Thread Matthew Dowle
Hi, Similar questions have come up before on the list and elsewhere but I haven't found a solution yet. winbuilder's install.out shows data.table's .c files compiled with -O3 on Win32 but -O2 on Win64. The same happens on R-Forge. I gather that some packages don't work with -O3 so the defau

Re: [Rd] read.csv reads more rows than indicated by wc -l

2012-12-20 Thread Matthew Dowle
Ben, Somewhere on my wish/TO DO list is for someone to rewrite read.table for better robustness *and* efficiency ... Wish granted. New in data.table 1.8.7 : = New function fread(), a fast and friendly file reader. * header, skip, nrows, sep and colClasses are all auto detected. * inte

Re: [Rd] built-in NAMED(obj) from within R

2012-11-09 Thread Matthew Dowle
Benjamin Tyner gmail.com> writes: > > Hello, > > Is it possible to retrieve the 'named' field within the header (sxpinfo) > of a object, without resorting to a debugger, external code, etc? And much more than just NAMED : .Internal(inspect(x)) > The goal is to ascertain whether a copy

Re: [Rd] There is pmin and pmax each taking na.rm, how about psum?

2012-11-04 Thread Matthew Dowle
> On Sun, Nov 4, 2012 at 6:35 AM, Justin Talbot > wrote: >>> >>> Then the case for psum is more for convenience and speed -vs- >>> colSums(rbind(x,y), na.rm=TRUE)), since rbind will copy x and y into a >>> new >>> matrix. The case for pprod is similar, plus colProds doesn't exist. >>> >> >> Right,

Re: [Rd] There is pmin and pmax each taking na.rm, how about psum?

2012-11-01 Thread Matthew Dowle
Justin Talbot stanford.edu> writes: > > > Because that's inconsistent with pmin and pmax when two NAs are summed. > > > > x = c(1,3,NA,NA,5) > > y = c(2,NA,4,NA,1) > > colSums(rbind(x, y), na.rm = TRUE) > > [1] 3 3 4 0 6# actual > > [1] 3 3 4 NA 6 # desired > > But your desired result would

Re: [Rd] There is pmin and pmax each taking na.rm, how about psum?

2012-10-30 Thread Matthew Dowle
Not pdiff because i) psum(x,-y,na.rm=TRUE) would do that and ii) diff is quite unlike -. Yes, pprod too, but not pdiv (or precip) because pprod(x,y^-1,na.rm=TRUE) would dominate that. > what about equivalent functions for ^, %%, %/%, &, and | ? I like the suggestion, but not as useful as psum an

Re: [Rd] There is pmin and pmax each taking na.rm, how about psum?

2012-10-30 Thread Matthew Dowle
and an aching desire for an answer does not > ensure that a reasonable answer can be extracted from a given body of > data. > ~ John Tukey > > > -Oorspronkelijk bericht- > Van: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] > Namens Matthew Dowl

[Rd] There is pmin and pmax each taking na.rm, how about psum?

2012-10-30 Thread Matthew Dowle
Hi, Please consider the following : x = c(1,3,NA,5) y = c(2,NA,4,1) min(x,y,na.rm=TRUE)# ok [1] 1 max(x,y,na.rm=TRUE)# ok [1] 5 sum(x,y,na.rm=TRUE)# ok [1] 16 pmin(x,y,na.rm=TRUE) # ok [1] 1 3 4 1 pmax(x,y,na.rm=TRUE) # ok [1] 2 3 4 5 psum(x,y,na.rm=TRUE) [1] 3 3 4 6

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-04 Thread Matthew Dowle
and --with-cloog to enable the Graphite loop transformation infrastructure. Could R build scripts be configured to set these gcc flags to turn on "Graphite", then? I guess one downside could be the time to compile. Matthew > > On Sep 2, 2012, at 10:32 PM, Simon Urbanek

[Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Matthew Dowle
In do_matrix in src/array.c there is a type switch containing : case LGLSXP : for (i = 0; i < nr; i++) for (j = 0; j < nc; j++) LOGICAL(ans)[i + j * NR] = NA_LOGICAL; That seems page inefficient, iiuc. Think it should be : case LGLSXP : for (j = 0; j < nc; j++) for (i =

[Rd] Non ascii character on Mac on CRAN (C locale)

2012-07-16 Thread Matthew Dowle
Dear all, A recent bug fix for data.table was for non-ascii characters in column names and grouping by those column. So, the package's test file now includes non-ascii characters to test that bug fix : # Test non ascii characters when passed as character by, #2134 x = rep(LETTERS[1:2], 3)

Re: [Rd] Understanding tracemem

2012-07-12 Thread Matthew Dowle
Hadley Wickham rice.edu> writes: > Why does x[5] <- 5 create a copy That assigns 5 not 5L. x is being coerced from integer to double. x[5] <- 5L doesn't copy. > , when x[11] (which should be > extending a vector does not) ? I can understand that maybe x[5] <- 5 > hasn't yet been optimised to

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

2012-06-14 Thread Matthew Dowle
Matthew Dowle mdowle.plus.com> writes: > > Will check R-Forge again when it catches up. Thanks. > Matthew > Just to confirm, R-Forge has today caught up and is now using R r59554 which includes the fix for the problem in this thread. Its binary build of data.table is now insta

Re: [Rd] How to change name of .so/.dll

2012-06-13 Thread Matthew Dowle
> On 12-06-13 4:45 AM, Matthew Dowle wrote: >> Matthew Dowle mdowle.plus.com> writes: >> >>> >>> On Tue, 2012-06-12 at 20:38 -0400, Simon Urbanek wrote: >>>> Something like >>>> >>>> all: $(SHLIB) >>>>

Re: [Rd] How to change name of .so/.dll

2012-06-13 Thread Matthew Dowle
Matthew Dowle mdowle.plus.com> writes: > > On Tue, 2012-06-12 at 20:38 -0400, Simon Urbanek wrote: > > Something like > > > > all: $(SHLIB) > > mv $(SHLIB) datatable$(SHLIB_EXT) > > > > should do the trick (resist the temptation to create

Re: [Rd] How to change name of .so/.dll

2012-06-13 Thread Matthew Dowle
On Tue, 2012-06-12 at 20:38 -0400, Simon Urbanek wrote: > Something like > > all: $(SHLIB) > mv $(SHLIB) datatable$(SHLIB_EXT) > > should do the trick (resist the temptation to create a datatable$(SHLIB_EXT) > target - it doesn't work due to the makefile loading sequence, > unfortunatel

Re: [Rd] How to change name of .so/.dll

2012-06-12 Thread Matthew Dowle
Matthew Dowle wrote : > Hi, > > I've added R_init_data_table to the "data.table" package (which has a dot > in its name). This works well in R 2.15.0, because of this from the > Writing R Extensions manual : > > " Note that there are some implicit restric

Re: [Rd] How to change name of .so/.dll

2012-06-12 Thread Matthew Dowle
Matthew Dowle wrote : > Hi, > > I've added R_init_data_table to the "data.table" package (which has a dot > in its name). This works well in R 2.15.0, because of this from the > Writing R Extensions manual : > > " Note that there are some implicit restric

[Rd] How to change name of .so/.dll

2012-06-12 Thread Matthew Dowle
Hi, I've added R_init_data_table to the "data.table" package (which has a dot in its name). This works well in R 2.15.0, because of this from the Writing R Extensions manual : " Note that there are some implicit restrictions on this mechanism as the basename of the DLL needs to be both a valid f

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

2012-06-07 Thread Matthew Dowle
> wrote: > > > 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-Interna

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

2012-06-07 Thread Matthew Dowle
> On 07/06/2012 12:49, Matthew Dowle wrote: >>> On 07/06/2012 11:40, Matthew Dowle wrote: >>>> >>>> Prof Ripley wrote : >>>>> That Depends line is about source installs. >>>> >>>> I can't see that documented in either

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

2012-06-07 Thread Matthew Dowle
> On 07/06/2012 11:40, Matthew Dowle wrote: >> >> Prof Ripley wrote : >>> That Depends line is about source installs. >> >> I can't see that documented in either Writing R Extensions or >> ?install.packages. Is it somewhere else? I thought Depends app

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

2012-06-07 Thread Matthew Dowle
Prof Ripley wrote : > That Depends line is about source installs. I can't see that documented in either Writing R Extensions or ?install.packages. Is it somewhere else? I thought Depends applied to binaries from CRAN too, which is the default method on Windows and Mac. Matthew _

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

2012-06-07 Thread Matthew Dowle
Prof Ripley wrote : > (AFAIK the CRAN binary package providers expect users to be > using the current version of R.) I guess it's quite common practice for very many users to fail that expectation. I for one do. I'm used to seeing "Warning: package was build using " when installing from CRAN. Bu

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

2012-06-07 Thread Matthew Dowle
Henrik Bengtsson biostat.ucsf.edu> writes: > See also R-devel '[Rd] Suggestion for memory optimization and > as.double() with friends', March 28-29 2007 > [https://stat.ethz.ch/pipermail/r-devel/2007-March/045109.html]. > > /Henrik Interesting thread. So we have you to thank for instigating tha

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] 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] Expected behaviour of is.unsorted?

2012-05-24 Thread Matthew Dowle
> On 24/05/2012 11:10 AM, Matthew Dowle wrote: >> > On 24/05/2012 9:15 AM, Matthew Dowle wrote: >> >> Duncan Murdoch gmail.com> writes: >> >> > >> >> > On 12-05-24 7:39 AM, Matthew Dowle wrote: >> >> > > Dun

Re: [Rd] Expected behaviour of is.unsorted?

2012-05-24 Thread Matthew Dowle
> On 24/05/2012 9:15 AM, Matthew Dowle wrote: >> Duncan Murdoch gmail.com> writes: >> > >> > On 12-05-24 7:39 AM, Matthew Dowle wrote: >> > > Duncan Murdoch gmail.com> writes: >> > >> >> > >> On 12-05-23 4:37 AM

Re: [Rd] Expected behaviour of is.unsorted?

2012-05-24 Thread Matthew Dowle
Duncan Murdoch gmail.com> writes: > > On 12-05-24 7:39 AM, Matthew Dowle wrote: > > Duncan Murdoch gmail.com> writes: > >> > >> On 12-05-23 4:37 AM, Matthew Dowle wrote: > > Since it seems to have a bug anyway (and if so, can't be correct in anyon

Re: [Rd] Expected behaviour of is.unsorted?

2012-05-24 Thread Matthew Dowle
Duncan Murdoch gmail.com> writes: > > On 12-05-23 4:37 AM, Matthew Dowle wrote: > > > > Hi, > > > > I've read ?is.unsorted and searched. Have found a few items but nothing > > close, yet. Is the following expected? > > > >> is.unsorted(d

[Rd] Expected behaviour of is.unsorted?

2012-05-23 Thread Matthew Dowle
Hi, I've read ?is.unsorted and searched. Have found a few items but nothing close, yet. Is the following expected? > is.unsorted(data.frame(1:2)) [1] FALSE > is.unsorted(data.frame(2:1)) [1] FALSE > is.unsorted(data.frame(1:2,3:4)) [1] TRUE > is.unsorted(data.frame(2:1,4:3)) [1] TRUE IIUC, is.u

Re: [Rd] test suites for packages

2012-05-17 Thread Matthew Dowle
Uwe Ligges statistik.tu-dortmund.de> writes: > > On 17.05.2012 16:52, Brian G. Peterson wrote: > > On Thu, 2012-05-17 at 16:32 +0200, Uwe Ligges wrote: > >> Yes: R CMD check does the trick. See Writing R Extension and read > >> about a package's test directory. I prefer frameworks that do not > >

Re: [Rd] fast version of split.data.frame or conversion from data.frame to list of its rows

2012-05-01 Thread Matthew Dowle
Antonio Piccolboni piccolboni.info> writes: > Hi, > I was wondering if there is anything more efficient than split to do the > kind of conversion in the subject. If I create a data frame as in > > system.time({fd = data.frame(x=1:2000, y = rnorm(2000), id = paste("x", > 1:2000, sep =""))}) >

Re: [Rd] Byte compilation of packages on CRAN

2012-04-11 Thread Matthew Dowle
> On 11/04/2012 20:36, Matthew Dowle wrote: >> In DESCRIPTION if I set LazyLoad to 'yes' will data.table (for example) >> then be byte compiled for users who install the binary package from CRAN >> on Windows? > > No. LazyLoad is distinct from byte compilatio

[Rd] Byte compilation of packages on CRAN

2012-04-11 Thread Matthew Dowle
In DESCRIPTION if I set LazyLoad to 'yes' will data.table (for example) then be byte compiled for users who install the binary package from CRAN on Windows? This question is based on reading section 1.2 of this document : http://www.divms.uiowa.edu/~luke/R/compiler/compiler.pdf I've searched r-deve

Re: [Rd] CRAN policies

2012-03-30 Thread Matthew Dowle
csiro.au> writes: > There must be over 2000 people who have written CRAN packages by now; every extra > check and non-back-compatible additional requirement runs the risk of generating false-negatives and > incurring many extra person-hours to "fix" non-problems. Plus someone needs to document

Re: [Rd] CRAN policies

2012-03-29 Thread Matthew Dowle
William Dunlap tibco.com> writes: > > -Original Message- > > The survival package has a similar special case: the routines for > > expected population survival are set up to accept multiple types of date > > format so have lines like > > if (class(x) == 'chron') { y <- as.numeric(x -

Re: [Rd] merge bug fix in R 2.15.0

2012-03-15 Thread Matthew Dowle
Anyone? > Is it intended that the first suffix can no longer be blank? Seems to be > caused by a bug fix to merge in R 2.15.0. > > $Rdevel --vanilla > DF1 = data.frame(a=1:3,b=4:6) > DF2 = data.frame(a=1:3,b=7:9) > merge(DF1,DF2,by="a",suffixes=c("",".1")) > Error in merge.data.frame(DF1, DF2, by

[Rd] merge bug fix in R 2.15.0

2012-03-14 Thread Matthew Dowle
Is it intended that the first suffix can no longer be blank? Seems to be caused by a bug fix to merge in R 2.15.0. $Rdevel --vanilla DF1 = data.frame(a=1:3,b=4:6) DF2 = data.frame(a=1:3,b=7:9) merge(DF1,DF2,by="a",suffixes=c("",".1")) Error in merge.data.frame(DF1, DF2, by = "a", suffixes = c("",

[Rd] 111 FIXMEs in main/src

2012-03-13 Thread Matthew Dowle
Hi, We sometimes see offers to contribute, asking what needs to be done. If they know C, how about the 111 FIXMEs? But which ones would be most useful to fix? Which are difficult and which are easy? Does R-core have a process to list and prioritise the FIXMEs? ~/R/Rtrunk/src/main$ grep "[^/]FIXME

[Rd] Identical copy of base function

2012-02-27 Thread Matthew Dowle
Hello, Regarding this in R-devel/NEWS/New features : o ‘library(pkg)’ no longer warns about a conflict with a function from ‘package:base’ if the function is an identical copy of the base one but with a different environment. Why would one want an identical copy in a different environment? I'm

[Rd] names<- appears to copy 3 times?

2012-01-17 Thread Matthew Dowle
Hi, $ R --vanilla R version 2.14.1 (2011-12-22) Platform: i686-pc-linux-gnu (32-bit) > DF = data.frame(a=1:3,b=4:6) > DF a b 1 1 4 2 2 5 3 3 6 > tracemem(DF) [1] "<0x8898098>" > names(DF)[2]="B" tracemem[0x8898098 -> 0x8763e18]: tracemem[0x8763e18 -> 0x8766be8]: tracemem[0x8766be8 -> 0x8766b68

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 8:05 AM, Matthew Dowle wrote: > >>> >>> On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: >>> >>>>> >>>>> On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: >>>>> >>>>>>

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 14:05 , Matthew Dowle wrote: > >> Since list() is primitive I tried to construct a data.frame starting >> with >> list() [since structure() isn't primitive], but then merely adding an >> attribute seems to set NAMED==2 too ? > >

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 12:34 , Matthew Dowle wrote: > >>> >>> On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: >>> >>>> Hi, >>>> >>>> I expected NAMED to be 1 in all these three cases. It is for one of >>>> them,

Re: [Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
> > On Nov 24, 2011, at 11:13 , Matthew Dowle wrote: > >> Hi, >> >> I expected NAMED to be 1 in all these three cases. It is for one of >> them, >> but not the other two? >> >>> R --vanilla >> R version 2.14.0 (2011-10-31) >> P

[Rd] Confused about NAMED

2011-11-24 Thread Matthew Dowle
Hi, I expected NAMED to be 1 in all these three cases. It is for one of them, but not the other two? > R --vanilla R version 2.14.0 (2011-10-31) Platform: i386-pc-mingw32/i386 (32-bit) > x = 1L > .Internal(inspect(x)) # why NAM(2)? expected NAM(1) @2514aa0 13 INTSXP g0c1 [NAM(2)] (len=1, tl=0)

Re: [Rd] Efficiency of factor objects

2011-11-07 Thread Matthew Dowle
Stavros Macrakis alum.mit.edu> writes: > > data.table certainly has some useful mechanisms, and I've been > experimenting with it as an implementation mechanism, though it's not a > drop-in substitute for factors. Also, though it is efficient for set > operations between small sets and large set

Re: [Rd] Contributors on R-Forge

2011-10-21 Thread Matthew Dowle
"Milan Bouchet-Valat" wrote in message news:1319202026.9174.6.camel@milan... > Le vendredi 21 octobre 2011 à 13:39 +0100, Charles Roosen a écrit : >> Hi, >> >> >> I've recently taken over maintenance for the "xtable" package, and have >> set it up on R-Forge. At the moment I'm pondering what th

[Rd] Possible to read R_StringHash from a package?

2011-08-30 Thread Matthew Dowle
Is there any way to look at R_StringHash from a package? I've read R-Ints 1.16.1 "Hiding C entry points" and seen that R_StringHash is declared as extern0 in Defn.h. So it seems the answer is no. Thanks, Matthew __ R-devel@r-project.org mailing list htt

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

2011-07-20 Thread Matthew Dowle
"Duncan Murdoch" wrote in message news:4e259600.5070...@gmail.com... > On 11-07-19 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,

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

2011-07-19 Thread Matthew Dowle
"Duncan Murdoch" wrote in message news:4e259600.5070...@gmail.com... > On 11-07-19 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,

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

2011-07-19 Thread Matthew Dowle
"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 float >> types. I >> think I'm pretty much there with you. >> >> As

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

2011-07-12 Thread Matthew Dowle
gt; 0.392 0.613 1.003 >> >> (Note: system.time() can be misleading when within() is involved, >> because >> the expression is evaluated in a different environment so within() won't >> actually change the object in the global environment - it also >> in

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

2011-07-12 Thread Matthew Dowle
e circumstances in which a shallow > copy would be OK but making sure it would be in all cases is probably > more trouble than it is worth at this point. (I've tried this in the > past in a few cases and always had to back off.) > > > Best, > > luke > > > &

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

2011-07-12 Thread Matthew Dowle
x27;t > actually change the object in the global environment - it also interacts > with the possible duplication) Noted, thanks. That's pretty fast. Does within() on data.frame fix the original issue Ivo raised, then? If so, job done. > > Cheers, > Simon > > On Jul

Re: [Rd] Suggestions for R-devel / R-help digest format

2011-07-08 Thread Matthew Dowle
Don't most people use a newsreader? For example, pointed to here : gmane.comp.lang.r.general gmane.comp.lang.r.devel IIUC, NNTP downloads headers only, when you open any post it downloads the body at that point. So it's more efficient than email (assuming you don't open every single pos

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

2011-07-06 Thread Matthew Dowle
David Winsemius wrote: > > > > > On Jul 5, 2011, at 7:18 PM, > > wrote: > > > >> On Tue, 5 Jul 2011, Simon Urbanek wrote: > >> > >>> > >>> On Jul 5, 2011, at 2:08 PM, Matthew Dowle wrote: > >>> > >&g

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

2011-07-05 Thread Matthew Dowle
ould save the user needing to use `[<-.data.table`(...) syntax to get the best speed (20 times faster on the small example used so far). Matthew On Tue, 2011-07-05 at 08:32 +0100, Matthew Dowle wrote: > Simon, > > Thanks for the great suggestion. I've written a skeleton assignm

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

2011-07-05 Thread Matthew Dowle
Simon, Thanks for the great suggestion. I've written a skeleton assignment function for data.table which incurs no copies, which works for this case. For completeness, if I understand correctly, this is for : i) convenience of new users who don't know how to vectorize yet ii) more complex ex

[Rd] help.request() for packages?

2011-04-26 Thread Matthew Dowle
Hi, Have I missed something, or misunderstood? The r-help posting guide asks users to contact the package maintainer : "If the question relates to a contributed package, e.g., one downloaded from CRAN, try contacting the package maintainer first. [snip] ONLY [only is bold font] send such ques

[Rd] method="radix" in sort.list() isn't actually a radix sort

2011-02-16 Thread Matthew Dowle
Dear list, Were you aware that, strictly speaking, do_radixsort in sort.c actually implements a counting sort, not a radix sort ? http://en.wikipedia.org/wiki/Counting_sort It it was a radix sort it wouldn't need the 100,000 range restriction. Clearly the method argument can't be changed (now)

Re: [Rd] match function causing bad performance when using tablefunction on factors with multibyte characters on Windows

2011-01-25 Thread Matthew Dowle
Thanks Simon! I can reproduce this on Linux now, too. locale -a didn't show en_US.iso88591 for me so I needed 'sudo locale-gen en_US' first. Then running R with $ LANG="en_US.ISO-8859-1" R is enough to reproduce the problem. Karl - can you use tabulate instead as Simon suggests? Matthew -- V

Re: [Rd] match function causing bad performance when usingtablefunction on factors with multibyte characters on Windows

2011-01-25 Thread Matthew Dowle
picking up your shell variables. Best to rule that out now by running sessionInfo() at the R prompt. Otherwise do you know profiling tools sufficiently to trace the problem at the C level as it runs on Windows? Matthew "Karl Ove Hufthammer" wrote in message news:ihm9qq$9ej$1...@dou

Re: [Rd] match function causing bad performance when using tablefunction on factors with multibyte characters on Windows

2011-01-24 Thread Matthew Dowle
em. >From NEWS 2.12.0 : o unique() and match() are now faster on character vectors where all elements are in the global CHARSXP cache and have unmarked encoding (ASCII). Thanks to Matthew Dowle for suggesting improvements to the way the hash code is generated in 'unique.c&#

Re: [Rd] reliability of R-Forge? (moved to R-Devel)

2010-08-26 Thread Matthew Dowle
Hi Spencer, Each commit increments the svn revision number regardless of the build status. md5sums on pkg may not change for commits (only) to www and branches. Yes, the DESCRIPTION file contains a field containing the package version number. The author edits that field and commits that change wh

Re: [Rd] reliability of R-Forge? (moving to r-Devel)

2010-08-26 Thread Matthew Dowle
Spencer and David, My experience of R-Forge : i) SVN access and project management web pages have been *very* reliable all this year ... up until the weekend. This week was the first time I ever saw "R-Forge Could Not Connect to Database". ii) The nightly build and checks have been consisten

Re: [Rd] Non-blocking Eval

2010-08-11 Thread Matthew Dowle
There is a video demo of exactly that on the data.table homepage : http://datatable.r-forge.r-project.org/ http://www.youtube.com/watch?v=rvT8XThGA8o However, last time I looked, svSocket uses text transfer. It would be really great if it did binary serialization, like Rserve does. Previous thr

Re: [Rd] [R] converting result of substitute to 'ordidnary'expression

2010-06-28 Thread Matthew Dowle
> ## this does work (thanks to the help page), but one needs to remember to > call eval > subset(dat, eval(subsetexp)) > Is there a way to create subsetexp that needs no eval inside the call to > subset()? Whats wrong with needing to call eval ? If I'm reading that code, and someone else wrot

Re: [Rd] suggestion how to use memcpy in duplicate.c

2010-04-22 Thread Matthew Dowle
src) != INTSXP) error("src must be integer data") ; for(i=0;i -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Romain Francois > Sent: Wednesday, April 21, 2010 12:32 PM > To: Matthew Dowle > Cc: r-de

Re: [Rd] suggestion how to use memcpy in duplicate.c

2010-04-22 Thread Matthew Dowle
Is this a thumbs up for memcpy for DUPLICATE_ATOMIC_VECTOR at least ? If there is further specific testing then let me know, happy to help, but you seem to have beaten me to it. Matthew "Simon Urbanek" wrote in message news:65d21b93-a737-4a94-bdf4-ad7e90518...@r-project.org... > > On Apr 21

[Rd] suggestion how to use memcpy in duplicate.c

2010-04-21 Thread Matthew Dowle
>From copyVector in duplicate.c : void copyVector(SEXP s, SEXP t) { int i, ns, nt; nt = LENGTH(t); ns = LENGTH(s); switch (TYPEOF(s)) { ... case INTSXP: for (i = 0; i < ns; i++) INTEGER(s)[i] = INTEGER(t)[i % nt]; break; ... could that be replaced with : c

Re: [Rd] Suggestion to add crantastic to resources section onposting guide

2010-03-05 Thread Matthew Dowle
that no one reads it. We should be thinking of ways to cut it down to a smaller size instead. On Fri, Mar 5, 2010 at 5:52 AM, Matthew Dowle wrote: > Under the "further resources" section I'd like to suggest the following > addition : > > * http://crantastic.org/ lis

Re: [Rd] shash in unique.c

2010-03-05 Thread Matthew Dowle
Thanks a lot. Quick and brief responses below... "Duncan Murdoch" wrote in message news:4b90f134.6070...@stats.uwo.ca... > Matthew Dowle wrote: >> I was hoping for a 'yes', 'no', 'maybe' or 'bad idea because ...'. No >> response

Re: [Rd] shash in unique.c

2010-03-05 Thread Matthew Dowle
s to you along with the patch. It would be on 32bit Ubuntu first, and I would need to either buy, rent time on, or borrow a 64bit machine to be able to then test there, owing to the nature of the suggestion. If its "no", "bad idea because..." or "we were already wor

  1   2   >