Re: [Rd] compiling packages for windows

2006-07-28 Thread Gabor Grothendieck
1. Check out: http://tolstoy.newcastle.edu.au/R/help/05/07/9167.html and the references there. 2. Also google for: making creating R package tutorial On 7/29/06, Ken Cheung <[EMAIL PROTECTED]> wrote: > hi, > > i've put together some R codes and created a source package. i > suc

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Kevin B. Hendricks
Hi Bill, >>>sum : igroupSums Okay, after thinking about this ... # assumes i is the small integer factor with n levels # v is some long vector # no sorting required igroupSums <- function(v,i) { sums <- rep(0,max(i)) for (j in 1:length(v)) { sums[[i[[j <- sums[[i[[j + v

[Rd] compiling packages for windows

2006-07-28 Thread Ken Cheung
hi, i've put together some R codes and created a source package. i successfully installed the package in unix using `R CMD INSTALL' i'd like also to install the source package on my PC, and would appreciate any pointer to how to go about it or reading material. i think it somehow involves co

Re: [Rd] Package digest broken under R v2.4.0 devel

2006-07-28 Thread Dirk Eddelbuettel
On 28 July 2006 at 08:52, Henrik Bengtsson wrote: | Found the reason for the bug. Patch available online; | | source("http://www.braju.com/R/patches/digest.R";) Splendid -- thank you for both the bug report, and the patch. The new revision digest_0.2.2 includes this patch. I also added unit

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Bill Dunlap
On Fri, 28 Jul 2006, Kevin B. Hendricks wrote: > Hi Bill, > > > Splus8.0 has something like what you are talking about > > that provides a fast way to compute > > sapply(split(xVector, integerGroupCode), summaryFunction) > > for some common summary functions. The 'integerGroupCode' > > is typ

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Kevin B. Hendricks
Hi Bill, > Splus8.0 has something like what you are talking about > that provides a fast way to compute > sapply(split(xVector, integerGroupCode), summaryFunction) > for some common summary functions. The 'integerGroupCode' > is typically the codes from a factor, but you could compute > it in

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Bill Dunlap
On Fri, 28 Jul 2006, Kevin B. Hendricks wrote: > > In my particular case, the problem was my data frame had over 1 > million lines had probably over 500,000 unique sort keys (ie. think > of it as an R factor with over 500,000 levels). The implementation > of "by" uses "tapply" which in turn uses

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Martin Maechler
> "Kevin" == Kevin B Hendricks <[EMAIL PROTECTED]> > on Fri, 28 Jul 2006 14:53:57 -0400 writes: [.] Kevin> The idea is to somehow make functions that work well Kevin> over small sub- sequences of a much longer vector Kevin> without resorting to splitting the ve

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread Seth Falcon
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > I also thought that there was no need for this level of complexity. > (BTW, some of the patch is changes Seth has made for other purposes, e.g. > that to memory.c, so please no one apply all of it.) *blush* sorry about that. I made the final diff

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread Robert Gentleman
OK, that suggests setting at the options level would solve both of your problems and that seems like the best approach. I don't really want to pass this around as a parameter through the maze of functions that might actually download something if we don't have to. I think we can provide somethi

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread Robert Gentleman
Prof Brian Ripley wrote: > On Fri, 28 Jul 2006, Robert Gentleman wrote: > >> I wonder if it would not be better to make the user agent string >> something that is configurable (at the time R is built) rather than at >> run time. This would make Seth's patch about 1% as long. Or this could >>

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread Henrik Bengtsson
On 7/28/06, Robert Gentleman <[EMAIL PROTECTED]> wrote: > I wonder if it would not be better to make the user agent string > something that is configurable (at the time R is built) rather than at > run time. This would make Seth's patch about 1% as long. Or this could > be handled as an option. The

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread Prof Brian Ripley
On Fri, 28 Jul 2006, Robert Gentleman wrote: > I wonder if it would not be better to make the user agent string > something that is configurable (at the time R is built) rather than at > run time. This would make Seth's patch about 1% as long. Or this could > be handled as an option. The patche

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread Robert Gentleman
I wonder if it would not be better to make the user agent string something that is configurable (at the time R is built) rather than at run time. This would make Seth's patch about 1% as long. Or this could be handled as an option. The patches are pretty extensive and allow for setting the agen

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Kevin B. Hendricks
Hi, > There was a performance comparison of several moving average > approaches here: > http://tolstoy.newcastle.edu.au/R/help/04/10/5161.html > Thanks for that link. It is not quite the same thing but is very similar. The idea is to somehow make functions that work well over small sub- sequ

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Gabor Grothendieck
There was a performance comparison of several moving average approaches here: http://tolstoy.newcastle.edu.au/R/help/04/10/5161.html The author of that message ultimately wrote the caTools R package which contains some optimized versions. Not sure if these results suggest anything of interest her

Re: [Rd] R uses private function in libc (PR#9107)

2006-07-28 Thread Thomas Lumley
> > > In any case, as you can see, __libc_stack_end goes away completely by libc > 2.3.6, and as noted in the follow-up I sent to this bug yesterday, the > reasons one shouldn't use this symbol are quite clearly stated here: > >

Re: [Rd] R uses private function in libc (PR#9107)

2006-07-28 Thread quanah
--On Friday, July 28, 2006 9:23 AM +0100 Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Fri, 28 Jul 2006, [EMAIL PROTECTED] wrote: > >> Full_Name: Quanah Gibson-Mount >> Version: 2.3.0, 2.3.1 >> OS: Linux > > That's not adequate information: see below. > >> Submission from: (NULL) (171.66.15

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Kevin B. Hendricks
Hi, I was using my installed R which is 2.3.1 for the first tests. I moved to the r-devel tree (I svn up and rebuild everyday) for my "by" tests to see if it would work any better. I neglected to retest "merge" with the devel version. So it appears "merge" is already fixed and I just need

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread James P. Howard, II
On 7/28/06, Seth Falcon <[EMAIL PROTECTED]> wrote: > I have a rough draft patch, see below, that adds a User-Agent header > to HTTP requests made in R via download.file. If there is interest, I > will polish it. It looks right, but I am running under Windows without a compiler. -- James P. How

Re: [Rd] [R] HTTP User-Agent header

2006-07-28 Thread Seth Falcon
[moved from R-help to R-devel] Prof Brian Ripley <[EMAIL PROTECTED]> writes: > Otherwise, see ?download.file and choose a different download method, > or look at the source code (src/modules/internet/nanohttp.c) and submit a > patch. I have a rough draft patch, see below, that adds a User-Agent

Re: [Rd] Package digest broken under R v2.4.0 devel

2006-07-28 Thread Henrik Bengtsson
Found the reason for the bug. Patch available online; source("http://www.braju.com/R/patches/digest.R";) In digest() the .Call() statement takes the serialized objected converted to a string as its second argument; val <- .Call("digest", as.character(object), as.integer(algoint),

Re: [Rd] substitute(INDICES) in by.data.frame returns invalid multi-line (PR#9109)

2006-07-28 Thread murdoch
On 7/28/2006 7:53 AM, [EMAIL PROTECTED] wrote: > Full_Name: Philip Kensche > Version: 2.3.0 This version is obsolete, but the error does occur in the current R-patched. > OS: Redhat Linux > Submission from: (NULL) (131.174.88.204) > > > Try this: > > -- > x <- data.frame(the.first.column=c("A"

Re: [Rd] substitute(INDICES) in by.data.frame returns invalid multi-line name (PR#9108)

2006-07-28 Thread Duncan Murdoch
On 7/28/2006 7:53 AM, [EMAIL PROTECTED] wrote: > Full_Name: Philip Kensche > Version: 2.3.0 This version is obsolete, but the error does occur in the current R-patched. > OS: Redhat Linux > Submission from: (NULL) (131.174.88.204) > > > Try this: > > -- > x <- data.frame(the.first.column=c("A"

[Rd] substitute(INDICES) in by.data.frame returns invalid multi-line name (PR#9108)

2006-07-28 Thread pkensche
Full_Name: Philip Kensche Version: 2.3.0 OS: Redhat Linux Submission from: (NULL) (131.174.88.204) Try this: -- x <- data.frame(the.first.column=c("A"), the.second.column=c("b"), the.third.column=c("d"), and.many.more.columns=c("e")) by(x, paste(x$the.first.column, x$the.second.column, x$and.ma

Re: [Rd] R uses private function in libc (PR#9107)

2006-07-28 Thread ripley
On Fri, 28 Jul 2006, [EMAIL PROTECTED] wrote: > Full_Name: Quanah Gibson-Mount > Version: 2.3.0, 2.3.1 > OS: Linux That's not adequate information: see below. > Submission from: (NULL) (171.66.155.86) > > > libc used to export the symbol: > > __libc_stack_end; > > however, newer versions of

[Rd] R uses private function in libc (PR#9107)

2006-07-28 Thread quanah
Full_Name: Quanah Gibson-Mount Version: 2.3.0, 2.3.1 OS: Linux Submission from: (NULL) (171.66.155.86) libc used to export the symbol: __libc_stack_end; however, newer versions of libc no longer export it. R has some serious problems around this, because the code has: # ifdef linux extern voi

Re: [Rd] Any interest in "merge" and "by" implementations specifically for sorted data?

2006-07-28 Thread Brian D Ripley
Which version of R are you looking at? R-devel has o merge() works more efficiently when there are relatively few matches between the data frames (for example, for 1-1 matching). The order of the result is changed for 'sort = FALSE'. On Thu, 27 Jul 2006, Kevin B. Hendric