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] 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" wrote in message news:4b44b12a.60...@ufl.edu... > ___

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

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 v

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

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

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

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

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

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

[Rd] allocVector reference

2007-03-14 Thread Matthew Dowle
Hi, I'm trying to write a function to return an R vector which points directly to a contiguous subset of another vector, without taking a copy. Since SEXPREC is a header followed by the data, rather than the header plus a pointer to the data, I'm not sure what I'm trying to do is possible. Is t

[Rd] Closed-source non-free ParallelR ?

2009-04-22 Thread Matthew Dowle
Dear R-devel, REvolution appear to be offering ParallelR only when bundled with their R Enterprise edition. As such it appears to be non-free and closed source. http://www.revolution-computing.com/products/parallel-r.php Since R is GPL and not LGPL, is this a breach of the GPL ? Below is t

Re: [Rd] Closed-source non-free ParallelR ?

2009-04-23 Thread Matthew Dowle
e. Could someone from the R Foundation or the FSF step in and clarify the situation please ? If in your opinion it is all fine what people are doing, why not release R under the LGPL for clarity ? Regards, Matthew - Original Message - From: "David M Smith" To: "Mat

Re: [Rd] About ParallelR and licensing of packages

2009-04-26 Thread Matthew Dowle
Dear Danese, Without prejudice save as to costs I am the author of the R library "data.table". I released data.table under the provisions of the General Public License (GPL). This email is to notify REvolution that we may be in dispute. If we are in dispute then I am entitled to issue litigat

[Rd] New class: data.table

2006-04-12 Thread Matthew Dowle
Hi, Following previous discussion on this list (http://tolstoy.newcastle.edu.au/R/devel/05/12/3439.html) I have created a package as suggested, and uploaded it to CRAN incoming : data.table.tar.gz. ** Your comments and feedback will be very much appreciated. ** >From help(data.table) : This cl

[Rd] c.factor

2006-11-14 Thread Matthew Dowle
Hi, Given factors x and y, c(x,y) does not seem to return a useful result : > x [1] a b c d e Levels: a b c d e > y [1] d e f g h Levels: d e f g h > c(x,y) [1] 1 2 3 4 5 1 2 3 4 5 > Is there a case for a new method c.factor as follows? Does something similar exist already? Is there a bette

Re: [Rd] c.factor

2006-11-15 Thread Matthew Dowle
s case, which is why I avoided it in the solution I posted. Regards, Matthew > -Original Message- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: 14 November 2006 18:23 > To: Marc Schwartz > Cc: Matthew Dowle; r-devel@r-project.org > Subject: Re: [Rd] c.fa

Re: [Rd] c.factor

2006-11-15 Thread Matthew Dowle
> Just for clarification, my interest was only to provide an > alternative that provided for a more generic approach, at > least in a narrow application, not that I was advocating it's > need. Understood, apologies for falsely implying your advocation. > I would agree with Prof. Ripley's comm

Re: [Rd] c.factor

2006-11-22 Thread Matthew Dowle
I noticed that a new feature in R 2.4 is that unlist of a list of factors already does the operation that I proposed : > x = factor(letters[1:5]) > y = factor(letters[4:8]) > unlist(list(x,y)) [1] a b c d e d e f g h Levels: a b c d e f g h > Therefore, does it not make sense that c(x,y) shoul

Re: [Rd] c.factor

2006-11-22 Thread Matthew Dowle
I just noticed that a new feature in R 2.4 is that unlist of a list of factors already does the operation that I proposed : > x = factor(letters[1:5]) > y = factor(letters[4:8]) > unlist(list(x,y)) [1] a b c d e d e f g h Levels: a b c d e f g h > Therefore, does it not make sense that c(x,y) s

<    1   2