[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 https://svn.r-project.org/R/trunk/src/main/attrib.c

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

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

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

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

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

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

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

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

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
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] 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 Fri, Jan 3, 2013, Bert Gunter wrote Well... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch ivo.welch at 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

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 ivo.welch at anderson.ucla.edu wrote: Dear R developers---I just spent half a day debugging an R program, which

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... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch ivo.welch

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: On Fri, Jan 3, 2013, Bert

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 solution yet

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 Win32 but -O2

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. *

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

2012-11-09 Thread Matthew Dowle
Benjamin Tyner btyner at 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

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 jtal...@stanford.edu 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 jtalbot at 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 be

[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] There is pmin and pmax each taking na.rm, how about psum?

2012-10-30 Thread Matthew Dowle
Tukey -Oorspronkelijk bericht- Van: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] Namens Matthew Dowle Verzonden: dinsdag 30 oktober 2012 12:03 Aan: r-devel@r-project.org Onderwerp: [Rd] There is pmin and pmax each taking na.rm, how about psum? Hi, Please

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

2012-09-04 Thread Matthew Dowle
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 wrote: On Sep 2, 2012, at 10:04 PM, Matthew Dowle wrote: In do_matrix in src

[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 = 0;

[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 hadley at 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

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

2012-06-14 Thread Matthew Dowle
Matthew Dowle mdowle at 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 installing fine

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, unfortunately).

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

2012-06-13 Thread Matthew Dowle
Matthew Dowle mdowle at 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 a datatable$(SHLIB_EXT) target - it doesn't work

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 Dowlemdowleat 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 a datatable

[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

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 restrictions on this mechanism as the basename of the DLL

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 restrictions on this mechanism as the basename of the DLL

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

2012-06-07 Thread Matthew Dowle
Henrik Bengtsson hb at 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

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
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 applied to binaries from CRAN too, which is the default method

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 Writing R Extensions or ?install.packages. Is it somewhere else? I thought Depends applied to binaries

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 dtenenba at 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

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

2012-06-06 Thread Matthew Dowle
Dan Tenenbaum dtenenba at 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

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

2012-06-06 Thread Matthew Dowle
Tim Hesterberg timhesterberg at 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

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

2012-05-24 Thread Matthew Dowle
Duncan Murdoch murdoch.duncan at 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(data.frame(1:2)) [1] FALSE is.unsorted(data.frame(2:1

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

2012-05-24 Thread Matthew Dowle
Duncan Murdoch murdoch.duncan at gmail.com writes: On 12-05-24 7:39 AM, Matthew Dowle wrote: Duncan Murdochmurdoch.duncanat 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 anyone's use of it), could

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

2012-05-24 Thread Matthew Dowle
On 24/05/2012 9:15 AM, Matthew Dowle wrote: Duncan Murdochmurdoch.duncanat gmail.com writes: On 12-05-24 7:39 AM, Matthew Dowle wrote: Duncan Murdochmurdoch.duncanat gmail.com writes: On 12-05-23 4:37 AM, Matthew Dowle wrote: Since it seems to have a bug anyway

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 Murdochmurdoch.duncanat gmail.com writes: On 12-05-24 7:39 AM, Matthew Dowle wrote: Duncan Murdochmurdoch.duncanatgmail.comwrites: On 12-05-23 4:37

[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,

Re: [Rd] test suites for packages

2012-05-17 Thread Matthew Dowle
Uwe Ligges ligges at 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 antonio at 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-12 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 compilation. All installed packages use lazy loading

[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

Re: [Rd] CRAN policies

2012-03-30 Thread Matthew Dowle
Mark.Bravington at 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

Re: [Rd] CRAN policies

2012-03-29 Thread Matthew Dowle
William Dunlap wdunlap at 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 = a,

[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(, .1)) :

[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?

[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]: DF a

[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) 1

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) Platform: i386-pc-mingw32/i386 (32-bit) x = 1L .Internal(inspect(x)) # why NAM(2

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, but not the other two? R --vanilla R version 2.14.0 (2011-10-31) Platform: i386-pc-mingw32/i386 (32-bit

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 ? Yes. As soon as there is the slightest risk of having (had

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

Re: [Rd] Efficiency of factor objects

2011-11-07 Thread Matthew Dowle
Stavros Macrakis macrakis at 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

Re: [Rd] Contributors on R-Forge

2011-10-21 Thread Matthew Dowle
Milan Bouchet-Valat nalimi...@club.fr 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

[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

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

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

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

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

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

2011-07-19 Thread Matthew Dowle
Duncan Murdoch murdoch.dun...@gmail.com wrote in message news:4e259600.5070...@gmail.com... On 11-07-19 7:48 AM, Matthew Dowle wrote: Prof Brian Ripleyrip...@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

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

2011-07-12 Thread Matthew Dowle
:21 PM, Matthew Dowle wrote: Thanks for the replies and info. An attempt at fast assign is now committed to data.table v1.6.3 on R-Forge. From NEWS : o 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

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

2011-07-12 Thread Matthew Dowle
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 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

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

2011-07-12 Thread Matthew Dowle
- 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 11, 2011, at 8:21 PM, Matthew Dowle wrote: Thanks for the replies and info. An attempt at fast

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

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

2011-07-06 Thread Matthew Dowle
, at 2:08 PM, Matthew Dowle wrote: Simon (and all), I've tried to make assignment as fast as calling `[-.data.table` directly, for user convenience. Profiling shows (IIUC) that it isn't dispatch, but x being copied. Is there a way to prevent '[-' from copying x? Good point

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

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

2011-07-05 Thread Matthew Dowle
On Tue, 2011-07-05 at 08:32 +0100, Matthew Dowle wrote: 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

[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

[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 usingtablefunction on factors with multibyte characters on Windows

2011-01-25 Thread Matthew Dowle
... Matthew Dowle wrote: I'm not sure, but note the difference in locale between Linux (UTF-8) and Windows (non UTF-8). As far as I understand it R much prefers UTF-8, which Windows doesn't natively support. Otherwise you could just change your Windows locale to a UTF-8 locale to make R happier

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

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

2011-01-24 Thread Matthew Dowle
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' If anybody knows a way

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

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

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 simon.urba...@r-project.org wrote in message

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

2010-04-22 Thread Matthew Dowle
Spotfire, TIBCO Software wdunlap tibco.com -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...@stat.math.ethz.ch Subject: Re: [Rd] suggestion

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

[Rd] Suggestion to add crantastic to resources section on posting guide

2010-03-05 Thread Matthew Dowle
Under the further resources section I'd like to suggest the following addition : * http://crantastic.org/ lists popular packages according to other users votes. Consider briefly reviewing the top 30 packages before posting to r-help since someone may have already released a package that

Re: [Rd] shash in unique.c

2010-03-05 Thread Matthew Dowle
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 working on it, or better, then I won't spend any more time on it. Matthew Matthew Dowle mdo

Re: [Rd] shash in unique.c

2010-03-05 Thread Matthew Dowle
Thanks a lot. Quick and brief responses below... Duncan Murdoch murd...@stats.uwo.ca 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 resulted in a retry() after a Sys.sleep(10 days

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 mdo...@mdowle.plus.com wrote: Under the further resources section I'd like to suggest the following addition : * http://crantastic.org/ lists popular packages

[Rd] shash in unique.c

2010-02-22 Thread Matthew Dowle
Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? shash would look like a

Re: [Rd] Why is there no c.factor?

2010-02-05 Thread Matthew Dowle
concat() doesn't get a lot of use How do you know? Maybe its used a lot but the users had no need to tell you what they were using. The exact opposite might in fact be the case i.e. because concat is so good in splus, you just never hear of problems with it from the users. That might be a

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread Matthew Dowle
A search for c.factor returns tons of hits on this topic. Heres just one of the hits from 2006, when I asked the same question : http://tolstoy.newcastle.edu.au/R/e2/devel/06/11/1137.html So it appears to be complicated and there are good reasons. Since I needed it, I created c.factor in

Re: [Rd] wiki down?

2010-01-14 Thread Matthew Dowle
I see the same problem. The wiki link on the R homepage doesn't seem to respond. A search of r-devel for subjects containing wiki finds this seemingly unanswered recent post. Is it known? -Matthew Ben Bolker bol...@ufl.edu wrote in message news:4b44b12a.60...@ufl.edu...

Re: [Rd] split.data.frame

2009-12-17 Thread Matthew Dowle
This seems very similar to the data.table package. The 'by' argument splits the data.table by that value then executes the j expression within each subset. The package documentation talks about 'subset' and 'with' in some detail. See ?[.data.table. dt = data.table(x=1:20, y=rep(1:4,each=5)

Re: [Rd] Using svSocket with data.table

2009-08-07 Thread Matthew Dowle
Hi Olaf, Thanks for your feedback, much appreciated. Don't be fooled. R does not handle multiple requests in parallel internally. I wasn't fooled, but I've added some annotations to the video at the place I might have given the impression I was (at 4min 39sec). Later, at 5min30sec I did

Re: [Rd] merge performace degradation in 2.9.1

2009-07-13 Thread Matthew Dowle
Is there a way to avoid the degradation in performance in 2.9.1? If the example is to demonstrate a difference between R versions that you really need to get to the bottom of then read no further. However, if the example is actually what you want to do then you can speed it up by using a

Re: [Rd] Can we generate exe file using R? What is the maximum file size valid?

2009-05-13 Thread Matthew Dowle
Does Ra get close to compiled R ? The R code is compiled on the fly to bytecode which is executed internally by an interpreter in C. The timing tests look impressive. http://www.milbo.users.sonic.net/ra/ __ R-devel@r-project.org mailing list

  1   2   >