Re: [Rd] wishlist -- Fix for major format.pval limitation (PR#9574)

2007-03-20 Thread Gabor Grothendieck
On 3/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On 3/20/2007 11:19 AM, [EMAIL PROTECTED] wrote: > > Full_Name: Charles Dupont > > Version: 2.4.1 > > OS: linux 2.6.18 > > Submission from: (NULL) (160.129.129.136) > > > > > > 'format.pval' has a major limitation in its implementation. For

Re: [Rd] wishlist -- Fix for major format.pval limitation (PR#9574)

2007-03-20 Thread Gabor Grothendieck
On 3/20/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 3/20/2007 12:44 PM, Gabor Grothendieck wrote: > > On 3/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> On 3/20/2007 11:19 AM, [EMAIL PROTECTED] wrote: > >> > Full_Name: Charles Dupont >

Re: [Rd] wishlist -- Fix for major format.pval limitation (PR#9574)

2007-03-20 Thread Gabor Grothendieck
On 3/20/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 3/20/2007 1:40 PM, Gabor Grothendieck wrote: > > On 3/20/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> On 3/20/2007 12:44 PM, Gabor Grothendieck wrote: > >> > On 3/20/07, [EMAIL PROTECTED]

Re: [Rd] as.Date nuance

2007-03-24 Thread Gabor Grothendieck
It matches in the sense of grep or regexpr grep("a", "ab") > 0 regexpr("a", "ab") > 0 Try this: x <- c("2006-01-01error", "2006-01-01") as.Date(x, "%Y-%m-%d") + ifelse(regexpr("^-..-..$", x) > 0, 0, NA) On 3/24/07, Vladimir Dergachev <[EMAIL PROTECTED]> wrote: > On Saturday 24 March 2007

Re: [Rd] Limitation of dirname() and basename()

2007-03-27 Thread Gabor Grothendieck
On 3/27/07, cstrato <[EMAIL PROTECTED]> wrote: > Hin-Tak Leung wrote: > > cstrato wrote: > >> 1. I did read the help file. > >> 2. I have my own workaround, using e.g. > >> file.info("/my/path/")[,"isdir"] > >> 3. This was a suggestion. > >> 4. If you agree with me that "/my/path/" is a path, then

[Rd] Behavior of seq_along (was: Create a new var reflecting the order of subjects in existing var)

2007-04-02 Thread Gabor Grothendieck
I am moving this from r-help to r-devel. Based on offline communications with Jim, suppose dat is defined as follows: set.seed(123) dat <- data.frame(ID= c(rep(1,2),rep(2,3), rep(3,3), rep(4,4), rep(5,5)), var1 =rnorm(17, 35,2), var2=runif(17,0,1)) # Then this ave call works as expected: ave

Re: [Rd] Behavior of seq_along (was: Create a new var reflecting the order of subjects in existing var)

2007-04-02 Thread Gabor Grothendieck
; attached base packages: > [1] "stats" "graphics" "grDevices" "utils" "datasets" > "methods" > [7] "base" > > > > cheers, > b > > On Apr 3, 2007, at 12:40 AM, Gabor Grothendieck wrote: &

Re: [Rd] list/matrix chimera

2007-04-10 Thread Gabor Grothendieck
On 4/10/07, hadley wickham <[EMAIL PROTECTED]> wrote: > On 4/10/07, Tony Plate <[EMAIL PROTECTED]> wrote: > > Aren't you just seeing the effect of drop=TRUE? (at least with the > > examples you give below -- they all pick out a submatrix with extent one > > on some dimension) > > > > AFAICT, matric

Re: [Rd] Sweave.sh shell script on CRAN

2007-04-16 Thread Gabor Grothendieck
On Windows sweave.bat is a Windows XP batchfile that will run sweave and then latex and then display the file on screen. Issuing the command sweave without args from the Windows command line gives info on how to use it. The batchfiles home page is: http://code.google.com/p/batchfiles/ The p

Re: [Rd] Sweave.sh shell script on CRAN

2007-04-16 Thread Gabor Grothendieck
On 4/16/07, Gregor Gorjanc <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > On Windows sweave.bat is a Windows XP batchfile that will run sweave > > and then latex and then display the file on screen. Issuing the command > > sweave without args from the Wind

Re: [Rd] Sweave.sh shell script on CRAN

2007-04-16 Thread Gabor Grothendieck
On 4/16/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 4/16/2007 7:53 AM, Gregor Gorjanc wrote: > > Duncan Murdoch wrote: > >>> I do not have any experience with use of (bash) shell scripts under > >>> Windows. Sweave.sh can be used with Cygwin, but I am not sure how to use > >>> shell script w

Re: [Rd] Sweave.sh shell script on CRAN

2007-04-16 Thread Gabor Grothendieck
On 4/16/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 4/16/2007 10:13 AM, Gabor Grothendieck wrote: > > On 4/16/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> On 4/16/2007 7:53 AM, Gregor Gorjanc wrote: > >> > Duncan Murdoch wrote: > >>

Re: [Rd] Sweave.sh shell script on CRAN

2007-04-16 Thread Gabor Grothendieck
On 4/16/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 4/16/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > On 4/16/2007 10:13 AM, Gabor Grothendieck wrote: > > > On 4/16/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > >> On 4/16/200

Re: [Rd] system() in packages

2007-04-27 Thread Gabor Grothendieck
One can use the R shell on Windows: shell("echo foo.bar | findstr foo") or an explicit call to the Windows cmd console: system("cmd /c echo foo.bar | findstr foo") On 4/27/07, Tony Plate <[EMAIL PROTECTED]> wrote: > With cygwin bash installed under Windows, one can use pipes in system(),

[Rd] parsing difference between 2.4.1 and 2.5.0

2007-04-27 Thread Gabor Grothendieck
I noticed the following difference in parse(text = ...) between R 2.4.1 and R 2.5.0. === > parse(text = "\"^\" (x ,2 )") expression(x^2) > R.version.string [1] "R version 2.4.1 Patched (2006-12-30 r40331)" > parse(text = "\"^\" (x ,2 )") expression("^" (x ,2 )) > R.version.string [1] "R v

Re: [Rd] parsing difference between 2.4.1 and 2.5.0

2007-04-27 Thread Gabor Grothendieck
Thanks, that did it. On 4/27/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 4/27/2007 11:34 AM, Gabor Grothendieck wrote: > > I noticed the following difference in parse(text = ...) between R > > 2.4.1 and R 2.5.0. > > > > === > > > >>

Re: [Rd] pure R code package for Windows

2007-04-28 Thread Gabor Grothendieck
If you want to build it on Windows (rather than do a cross build) there are links to HowTo's in the Links section of this page regarding various Windows tasks: http://code.google.com/p/batchfiles/ On 4/28/07, Petr Savicky <[EMAIL PROTECTED]> wrote: > Dear R developers, > > I am using R under L

Re: [Rd] grep with fixed=TRUE and ignore.case=TRUE

2007-05-07 Thread Gabor Grothendieck
Seems like a good idea to me. Here is a workaround that works in any event which combines (?i), \Q and \E . to get the same effect. (?i) gives case insensitive matches and \Q and \E quote and endquote the intervening text disabling special characters: x <- c("D.G cat", "d.g cat", "dog cat") z <-

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread Gabor Grothendieck
I agree that wider use of generics in the core of R is desirable as it facilitates designs in various addon packages that are much easier to use. In the absence of generics, the addon package either has to clobber/mask the version in the core, which really is unacceptable, or define a different na

Re: [Rd] Behaviour of read.table with empty columns

2007-05-09 Thread Gabor Grothendieck
Perhaps this has to do with the fact that there is not enough information available to establish the class of those columns. For example, try this: read.table("clipboard", colClasses = "character") On 5/9/07, John Fox <[EMAIL PROTECTED]> wrote: > Dear r-devel list members, > > I stumbled across

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread Gabor Grothendieck
The generics don't have to be S4. In fact, in many cases it would be better to have them be S3 for consistency with other similar generics in the core of R. Or I wonder about the possibility of having generics which can have some methods being of S3 and others of S4. On 5/9/07, Robert Gentleman

Re: [Rd] Implicit vs explicit printing and the call stack

2007-05-12 Thread Gabor Grothendieck
I can't reproduce that with ggplot 0.4-0 as some of the functions you are using do not appear to be part of ggplot (I suspect you are using a newer version of ggplot than you have released) but the following illustrates the difference using "R version 2.5.0 Patched (2007-05-01 r41405)" and lattice

Re: [Rd] symbollic differentiation in R

2007-05-13 Thread Gabor Grothendieck
On 5/13/07, Andrew Clausen <[EMAIL PROTECTED]> wrote: > Hi all, > > I wrote a symbollic differentiation function in R, which can be downloaded > here: > >http://www.econ.upenn.edu/~clausen/computing/Deriv.R >http://www.econ.upenn.edu/~clausen/computing/Simplify.R > > It is just a pr

Re: [Rd] symbollic differentiation in R

2007-05-13 Thread Gabor Grothendieck
On 5/13/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 5/13/07, Andrew Clausen <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I wrote a symbollic differentiation function in R, which can be downloaded > > here: > > > >h

Re: [Rd] relist, an inverse operator to unlist

2007-05-13 Thread Gabor Grothendieck
I suggest you define a "relist" class and then define an unlist method for it which stores the skeleton as an attribute. Then one would not have to specify skeleton in the relist command so relist(unlist(relist(x))) === x 1. relist(x) is the same as x except it gets an additional class "relist".

Re: [Rd] relist, an inverse operator to unlist

2007-05-13 Thread Gabor Grothendieck
e added to unlist. > I expect there would be some objections to enabling this as default behaviour, > as it would significantly increase the storage requirements of the output. > > Cheers, > Andrew > > On Sun, May 13, 2007 at 07:02:37PM -0400, Gabor Grothendieck wrote

Re: [Rd] RFC: allow packages to advertise vignettes on Windows

2007-05-15 Thread Gabor Grothendieck
Just a few other points: - vignettes are potentially of interest even before you download the package in order to decide whether the package is of interest. The discussion so far here does not address that. If I am interested in mypackage I will typically google for CRAN mypackage and then loo

Re: [Rd] 'attach workspace' on R console File menu

2007-05-16 Thread Gabor Grothendieck
On 5/16/07, Christos Hatzis <[EMAIL PROTECTED]> wrote: > Quite often I save misc functions and data objects as .RData files that I > can use in other sessions. Although I could 'Load Workspace" these files, > most of the times I prefer attaching them. It would be really convenient to > have a men

Re: [Rd] 'attach workspace' on R console File menu

2007-05-16 Thread Gabor Grothendieck
eates a > new user menu where the new item can be added. Although not ideal, it is an > acceptable workaround. > > Thanks. > -Christos > > > -Original Message- > > From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, May 16, 2007 1:

Re: [Rd] citation question

2007-05-16 Thread Gabor Grothendieck
This is how one package handled it: > packageDescription("RSVGTipsDevice")$Author [1] "Tony Plate <[EMAIL PROTECTED]>, based on RSVGDevice by T Jake\nLuciani <[EMAIL PROTECTED]>" On 5/16/07, Ben Bolker <[EMAIL PROTECTED]> wrote: > > I want to put the correct information into the "author" field

Re: [Rd] RFC: allow packages to advertise vignettes on Windows

2007-05-18 Thread Gabor Grothendieck
Perhaps all the arguments in demo, data and vignette should be regularized to be consistent, not just this one. On 5/18/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > I think we've agreed about adding an option to the vignette() function > to allow the user to choose to see all vignettes in insta

Re: [Rd] RFC: adding an 'exact' argument to [[

2007-05-22 Thread Gabor Grothendieck
In addition to $ that was mentioned in this thread there is also attr, e.g. > names(attributes(CO2)) [1] "names" "row.names" "class" "formula" "outer" "labels" [7] "units" > attr(CO2, "f") # matches "formula" uptake ~ conc | Plant On 5/17/07, Seth Falcon <[EMAIL PROTECTED]> wrote:

Re: [Rd] relist, an inverse operator to unlist

2007-05-22 Thread Gabor Grothendieck
One additional idea. I wonder if reshape might be promoted to a generic and relist made into methods for it. The unlisted version of an object would be the "long" version and the original version of the list would be the "wide" version. This would consolidate the two concepts together and make i

Re: [Rd] relist, an inverse operator to unlist

2007-05-23 Thread Gabor Grothendieck
ur proposal could be used? > Reshape never returns a vector. > > Cheers, > Andrew > > On Tue, May 22, 2007 at 07:36:56PM -0400, Gabor Grothendieck wrote: > > One additional idea. > > > > I wonder if reshape might be promoted to a generic and relist made > > i

Re: [Rd] relist, an inverse operator to unlist

2007-05-23 Thread Gabor Grothendieck
On 5/23/07, Seth Falcon <[EMAIL PROTECTED]> wrote: > Andrew Clausen <[EMAIL PROTECTED]> writes: > > > Hi Seth, > > > > On Mon, May 21, 2007 at 05:15:10PM -0700, Seth Falcon wrote: > >> I will also add that the notion of a default argument on a generic > >> function seems a bit odd to me. If an arg

Re: [Rd] relist, an inverse operator to unlist

2007-05-23 Thread Gabor Grothendieck
On 5/23/07, Martin Maechler <[EMAIL PROTECTED]> wrote: > >>>>> "GaGr" == Gabor Grothendieck <[EMAIL PROTECTED]> > >>>>> on Wed, 23 May 2007 08:56:50 -0400 writes: > >GaGr> On 5/23/07, Seth Falcon <[EMAI

Re: [Rd] relist, an inverse operator to unlist

2007-05-23 Thread Gabor Grothendieck
On 5/23/07, hadley wickham <[EMAIL PROTECTED]> wrote: > On 5/23/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > > On 5/23/07, Martin Maechler <[EMAIL PROTECTED]> wrote: > > > >>>>> "GaGr" == Gabor Grothendieck <[EMAIL PROTE

Re: [Rd] minor flaw in integrate()

2007-07-03 Thread Gabor Grothendieck
If integrate is changed it would be nice at the same time to make it into an S3 generic. deriv already is an S3 generic but strangely integrate is not. Ryacas provides a deriv method but for integrate Ryacas inconsistently provides Integrate since integrate is not generic. On 6/28/07, Peter Ruck

[Rd] Problem with {

2007-07-09 Thread Gabor Grothendieck
Why does the error get generated here? Is it a bug? It seems that f and "{" are the same but when used in sapply f works but { does not. Is its use in lapply really "an incorrect context"? > f <- function(x, y) y > f(1, 2) [1] 2 > "{"(1, 2) [1] 2 > lapply("y", function(x, y) y, 1:4) # ok [[1]] [

Re: [Rd] Problem with {

2007-07-09 Thread Gabor Grothendieck
{", letters, 1:26) # same a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 On 7/9/07, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > Why does the e

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Gabor Grothendieck
Even that does not appear to work everywhere. Either of these returns NULL: formals(args("{")) formals(args(match.fun("{"))) > R.version.string # XP [1] "R version 2.5.1 (2007-06-27)" On 7/11/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > formals(args(log)) > $x > > > $base > exp(1) > > g

Re: [Rd] Getting param names of primitives

2007-07-11 Thread Gabor Grothendieck
These don't work either: args(match.fun("{")) args("{") On 7/11/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Wed, 11 Jul 2007, Duncan Murdoch wrote: > > > On 7/11/2007 9:40 AM, Seth Falcon wrote: > >> Prof Brian Ripley <[EMAIL PROTECTED]> writes: > >> > >>> My problem is that if we mak

Re: [Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread Gabor Grothendieck
You could look at the Ryacas package for some ideas. zzz.R in http://ryacas.googlecode.com/svn/trunk/R/zzz.R is invoked at library(Ryacas) checking whether certain binaries are present and if not present then issues a message telling the user to run yacasInstall() without arguments. yacasIn

Re: [Rd] parse(text=...) and the srcfile attribute

2007-07-12 Thread Gabor Grothendieck
You can do this: > [EMAIL PROTECTED] [1] "\na <- 1; b <- 2**2\na + b\n" > # or this > as.character(foo) [1] "a <- 1" "b <- 2^2" "a + b" On 7/12/07, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to understand whether the new source file references can > help me with something

Re: [Rd] Suggestion to extend aggregate() to return multiple and/or named values

2007-07-13 Thread Gabor Grothendieck
Note that summaryBy in the doBy package can also do that. library(doBy) DF <- data.frame(z, A = Ind$A, B = Ind$B) summaryBy(z ~ A + B, DF, FUN = summary) summaryBy(z ~ A + B, DF, FUN = summary2) On 7/13/07, Mike Lawrence <[EMAIL PROTECTED]> wrote: > Hi all, > > This is my first post to the develo

Re: [Rd] Suggestion to extend aggregate() to return multiple and/or named values

2007-07-13 Thread Gabor Grothendieck
Note that it does not work in this case: > aggregate(CO2[4:5], CO2[1:2], mean) PlantType conc uptake 1Qn1 Quebec 435 33.22857 2Qn2 Quebec 435 35.15714 3Qn3 Quebec 435 37.61429 4Qc1 Quebec 435 29.97143 5Qc3 Quebec 435 32.58571 6Qc2

[Rd] row names and identical

2007-07-14 Thread Gabor Grothendieck
Below x1, x2 and x3 all have the same data and all have the same value for row.names(x); however, the internal values of their row.names differ. The internal value of row.names is c(NA, -4L) for x1, c(NA, 4L) for x2 and c("1", "2", "3", "4") for x3; nevertheless, identical regards x1 and x2 as iden

Re: [Rd] row names and identical

2007-07-15 Thread Gabor Grothendieck
em as a vector of integers, > > > > rownames = getAttrib(df, R_RowNamesSymbol); > > if (IS_INTEGER(rownames)) { > > for (int i = 0; i < LENGTH(rownames); i++) foo(INTEGER(rownames)[i] > > ...); > > } > > > > Cheers, > > M. Manese > >

[Rd] formula(CO2)

2007-07-16 Thread Gabor Grothendieck
The formula attribute of the builtin CO2 dataset seems a bit strange: > formula(CO2) Plant ~ Type + Treatment + conc + uptake What is one supposed to do with that? Certainly its not suitable for input to lm and none of the examples in ?CO2 use the above.

Re: [Rd] formula(CO2)

2007-07-16 Thread Gabor Grothendieck
data.frame: > [EMAIL PROTECTED] uptake ~ conc | Plant > formula(CO2) Plant ~ Type + Treatment + conc + uptake Is this really how its supposed to work??? On 7/16/07, Ted Harding <[EMAIL PROTECTED]> wrote: > On 16-Jul-07 13:28:50, Gabor Grothendieck wrote: > > The formula attri

Re: [Rd] formula(CO2)

2007-07-16 Thread Gabor Grothendieck
ell taken but I think formula.data.frame could still have the current default yet be user overridable via the formula attribute. On 7/16/07, Gavin Simpson <[EMAIL PROTECTED]> wrote: > On Mon, 2007-07-16 at 14:57 +0100, [EMAIL PROTECTED] wrote: > > On 16-Jul-07 13:28:50, Gabor Grothen

Re: [Rd] formula(CO2)

2007-07-16 Thread Gabor Grothendieck
Note that the formula uptake ~. will do the same thing so its not clear how useful this facility really is. On 7/16/07, Ted Harding <[EMAIL PROTECTED]> wrote: > On 16-Jul-07 14:16:10, Gabor Grothendieck wrote: > > Following up on your comments it seems formula.data.frame jus

Re: [Rd] formula(CO2)

2007-07-16 Thread Gabor Grothendieck
Yes. That's what I was referring to. On 7/16/07, Ted Harding <[EMAIL PROTECTED]> wrote: > On 16-Jul-07 14:42:19, Gabor Grothendieck wrote: > > Note that the formula uptake ~. will do the same thing so its > > not clear how useful this facility really is. > > H

Re: [Rd] substitute and expression

2007-07-16 Thread Gabor Grothendieck
On 7/16/07, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to understand whether the use of substitute() is > appropriate/documented for plotmath annotation. The following two > calls give the same results: > > > plot(1:10, main = expression(alpha == 1)) > > do.call(plot, list(1:10

[Rd] package NULL not found

2007-07-19 Thread Gabor Grothendieck
In performing Rcmd check I am getting this output regarding using Argument '' and a NULL package not found and it stops with an error: * using log directory 'C:/Rpkgs/sqldf.Rcheck' * using ARGUMENT ' ' __ignored__ R version 2.5.1 (2007-06-27) * checking for file 'sqldf/DESCRIPTION' ... OK * this

Re: [Rd] package NULL not found

2007-07-19 Thread Gabor Grothendieck
I noticed I am getting the same messages when trying to check other packages too such as gsubfn which previously checked ok. I had recently reinstalled cygwin so its likely something to do with that but have not tracked it down. On 7/19/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote

Re: [Rd] package NULL not found

2007-07-19 Thread Gabor Grothendieck
ter.only = TRUE, logical = TRUE, 2: package NULL in options("defaultPackages") was not found See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. On 7/19/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 19/07/

Re: [Rd] package NULL not found

2007-07-19 Thread Gabor Grothendieck
his path. I found it quite difficult to solve this problem. On 7/19/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 19/07/2007 7:16 PM, Gabor Grothendieck wrote: > > Thanks. I tried performing the check from an empty directory but > > it still gave the same response. Where

Re: [Rd] dict package: dictionary data structure for R

2007-07-21 Thread Gabor Grothendieck
Although the proto package is not particularly aimed at hashing note that it covers some of the same ground and also is based on a well thought out object model (known as object-based programming or prototype programming). Here is an example where we create two proto objects (which could be regard

Re: [Rd] Changes in the MEMSS package (data sets from Pinheiro and Bates, 2000, without the groupedData classes)

2007-07-24 Thread Gabor Grothendieck
Does this include datasets such as CO2 and ChickWeight which are in the datasets package? Could you post a list of the specific datasets you are referring to so there is no confusion what this is about. On 7/24/07, Douglas Bates <[EMAIL PROTECTED]> wrote: > Some time ago Deepayan and I created a

Re: [Rd] Changes in the MEMSS package (data sets from Pinheiro and Bates, 2000, without the groupedData classes)

2007-07-24 Thread Gabor Grothendieck
On a related note CO2 and ChickWeight in datasets have nlme specific attributes so either those datasets themselves should be moved to nlme or the nlme specific attributes removed in datasets as well. On 7/24/07, Douglas Bates <[EMAIL PROTECTED]> wrote: > On 7/24/07, Gabor Grothendiec

Re: [Rd] [R] aggregate.ts

2007-07-25 Thread Gabor Grothendieck
On 7/25/07, Paul Gilbert <[EMAIL PROTECTED]> wrote: > (moved from r-help) > > Achim Zeileis wrote: > > >On Wed, 25 Jul 2007, laimonis wrote: > > > > > > > >>Consider the following scrap of code: > >> > >> > > > >...slightly modified to > > x1 <- ts(1:24, start = c(2000, 10), freq = 12) > > x2 <-

Re: [Rd] Optimization in R

2007-08-04 Thread Gabor Grothendieck
I think it would be desirable for optim to have a dispatching mechanism that allows users to add their own optimization techniques to those provided without having to modify optim and without having to come up with a new visible function. For example, if we call optim as optim(...whatever..., meth

Re: [Rd] Optimization in R

2007-08-04 Thread Gabor Grothendieck
rdoch <[EMAIL PROTECTED]> wrote: > On 04/08/2007 1:05 PM, Gabor Grothendieck wrote: > > I think it would be desirable for optim to have a dispatching mechanism > > that allows users to add their own optimization techniques to those > > provided without having to modify optim a

Re: [Rd] Optimization in R

2007-08-04 Thread Gabor Grothendieck
The example of generic functions. On 8/4/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 04/08/2007 2:23 PM, Gabor Grothendieck wrote: > > For the same reason that generic functions exist. They don't have > > a lot of common code but it makes easier to use. Perhaps

Re: [Rd] Optimization in R

2007-08-04 Thread Gabor Grothendieck
ser's viewpoint and allow all of them to work consistently through the same interface. On 8/4/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 04/08/2007 2:53 PM, Gabor Grothendieck wrote: > > The example of generic functions. > > Show me an example where we have a l

[Rd] expand.grid fails on zero dims

2007-08-17 Thread Gabor Grothendieck
expand.grid fails if any of the arguments are zero length: > expand.grid(1:2, 1, seq_len(0)) Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) : invalid number of copies in rep.int() I think it would be desirable if it output a data frame with zero rows.

Re: [Rd] compiling R under cygwin

2007-08-21 Thread Gabor Grothendieck
On 8/21/07, M. Edward (Ed) Borasky <[EMAIL PROTECTED]> wrote: > Prof Brian Ripley wrote: > > Yes, > > > >> What is the advantage of building this? > > > > was my question too. If you want a Unix-like version of R on PC hardware > > running Windows why not run a Unix-like OS under a virtual machine

Re: [Rd] compiling R under cygwin

2007-08-23 Thread Gabor Grothendieck
Having it be the same under cygwin as it is for other UNIX systems would be ok but for the native Windows port R should behave like other Windows applications, not like UNIX applications. On 8/23/07, Latchezar (Lucho) Dimitrov <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From:

Re: [Rd] compiling R under cygwin

2007-08-23 Thread Gabor Grothendieck
> Finally I just wanted to have my vote put there (apparently not where > your vote is) not to argue. > > > -Original Message- > > From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 23, 2007 4:01 PM > > To: Latchezar (Lucho) Dimitrov

Re: [Rd] Friday question: negative zero

2007-08-31 Thread Gabor Grothendieck
On 8/31/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > The IEEE floating point standard allows for negative zero, but it's hard > to know that you have one in R. One reliable test is to take the > reciprocal. For example, > > > y <- 0 > > 1/y > [1] Inf > > y <- -y > > 1/y > [1] -Inf > > The

[Rd] within in R 2.6.0dev is not found

2007-09-01 Thread Gabor Grothendieck
The NEWS file refers to a new function within but it does not appear to be found: > within() Error: could not find function "within" > R.version.string # Windows Vista [1] "R version 2.6.0 Under development (unstable) (2007-08-31 r42709)" __ R-devel@r-

Re: [Rd] within in R 2.6.0dev is not found

2007-09-01 Thread Gabor Grothendieck
On 9/1/07, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > The NEWS file refers to a new function within but it does not appear > > to be found: > > > > > >> within() > >> > > Error: could not find functi

Re: [Rd] When 1+2 != 3 (PR#9895)

2007-09-03 Thread Gabor Grothendieck
Not sure if this counts but using the Ryacas package > library(Ryacas) > x <- Sym("x") > Set(x, Sym(3)/7) expression(3/7) > cat(i, "0: "); print(x) 10 0: expression(3/7) > for(i in 1:10) { + yacas("Set(x, If(x <= 1/2, 2*x, 2*(1-x)))") + cat(i, "i: "); print(x) + } 1 i: expression(6/7) 2 i: express

[Rd] Rcmd install on Vista

2007-09-07 Thread Gabor Grothendieck
Has anyone successfully used Rcmd install or Rcmd check on Windows Vista? I have been successfully been running R itself, just not Rcmd install and Rcmd check. Rcmd check fails, the Ryacas.Rcheck it creates is read-only, I don't have permission to delete it and I have to reset the permissions on

Re: [Rd] Rcmd install on Vista

2007-09-08 Thread Gabor Grothendieck
Windows console will search for it. It should NOT be present. However, MiKTeX and Rtools should be installed. On 9/7/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Has anyone successfully used Rcmd install or Rcmd check on > Windows Vista? I have been successfully been running R it

Re: [Rd] Windows Vista Issues

2007-09-08 Thread Gabor Grothendieck
If you find you need to turn UAC off try, instead, installing R into %userprofile%\Documents\R\R-2.6.0 (assuming R 2.6.0). I run with UAC *on* although actually I was able to run R with UAC on even with R in c:\Program Files\R\R-2.6.0. It was only R CMD CHECK/INSTALL that was a problem and even

[Rd] warning upon automatic close of connection

2007-09-12 Thread Gabor Grothendieck
I noticed that under R 2.6.0 there is a warning about closing the connection in the code from this post: https://stat.ethz.ch/pipermail/r-help/2007-September/140601.html which is evidently related to the following from the NEWS file: o Connections will be closed if there is no R object refe

Re: [Rd] Building an R GUI using gWidgets and RGtk2

2007-09-14 Thread Gabor Grothendieck
A fourth approach would be the proto package. It provides a thin layer over environments making use of the prototype (aka object-based) style of programming which is fundamental different relative to class-based programming (although it is powerful enough to encompass class based programming). Th

Re: [Rd] Date vs date

2007-09-14 Thread Gabor Grothendieck
On 9/14/07, Terry Therneau <[EMAIL PROTECTED]> wrote: > I wrote the date package long ago, and it has been useful. In my current > task > of reunifying the R (Tom Lumley) and Splus (me) code trees for survival, I'm > removing the explicit dependence on 'date' objects from the expected survival >

Re: [Rd] Building an R GUI using gWidgets and RGtk2

2007-09-14 Thread Gabor Grothendieck
On 9/14/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 9/14/07, Gerlanc, Daniel <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I'm developing a GUI in R that will be used to monitor financial > > portfolio performance. The GUI will be distribute

[Rd] r cmd build

2007-09-15 Thread Gabor Grothendieck
On Windows Vista hhc.exe is not available. One can do this on an install: rcmd install --docs=normal myPackage to avoid the message about hhc.exe; however, "rcmd build" does not appear to support --docs=normal so one cannot do a build without getting a message about hhc.exe (although the build s

Re: [Rd] r cmd build

2007-09-16 Thread Gabor Grothendieck
s you mention to create a .tar.gz release file on Vista? On 9/16/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 15/09/2007 10:27 PM, Gabor Grothendieck wrote: > > On Windows Vista hhc.exe is not available. One can do this on an > > install: > > > > rcmd inst

Re: [Rd] r cmd build

2007-09-16 Thread Gabor Grothendieck
rid of the message or improve the message. Again, this all refers to doing a build on Vista. On 9/16/07, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > > Gabor Grothendieck wrote: > > The Writing Extensions manual says to do an R CMD build for releases > > to CRAN. That&#

Re: [Rd] Date vs date (long)

2007-09-17 Thread Gabor Grothendieck
On 9/17/07, Terry Therneau <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck > > as.Date(10) > You can define as.Date.numeric in your package and then it will work. zoo > has done that. > > library(zoo) > as.Date(10) > > This is also a nice idea. Although ad

[Rd] delayedAssign

2007-09-19 Thread Gabor Grothendieck
The last two lines of example(delayedAssign) give this: > e <- (function(x, y = 1, z) environment())(1+2, "y", {cat(" HO! "); pi+2}) > (le <- as.list(e)) # evaluates the promises $x $y $z which contrary to the comment appears unevaluated. Is the comment wrong or is it supposed to return an ev

Re: [Rd] delayedAssign

2007-09-19 Thread Gabor Grothendieck
Also note that earlier in the same example we have: > msg <- "old" > delayedAssign("x", msg) > msg <- "new!" > x #- new! [1] "new!" > substitute(x) #- msg x > R.version.string # Vista [1] "R version 2.6.0 alpha (2007-09-06

[Rd] copying promise

2007-09-19 Thread Gabor Grothendieck
1. Is there some way to copy a promise so that the copy has the same expression in its promise as the original. In the following we y is a promise that we want to copy to z. We want z to be a promise based on the expression x since y is a promise based on the expression x. Thus the answer to the

Re: [Rd] warning upon automatic close of connection

2007-09-21 Thread Gabor Grothendieck
level of warnings that issue information on garbage collection, closed connections, etc. or perhaps the user could have control over it but having it as the default is really a nuisance and I hope this warning can be removed. On 9/12/07, Seth Falcon <[EMAIL PROTECTED]> wrote: > "Gabo

[Rd] Inspecting promises

2007-09-23 Thread Gabor Grothendieck
Is there some way of displaying the expression and evaluation environment associated with a promise? I have found the following: > # first run these two commands to set up example > e <- new.env() > delayedAssign("y", x*x, assign.env = e) > # method 1. shows expression but not evaluation envir

Re: [Rd] delayedAssign

2007-09-26 Thread Gabor Grothendieck
> typeof(z[[1]]) [1] "promise" > typeof(force(z[[1]])) [1] "promise" > R.version.string # Vista [1] "R version 2.6.0 beta (2007-09-23 r42958)" On 9/19/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > The last two lines of example(delayedAssign) give this: >

Re: [Rd] delayedAssign

2007-09-27 Thread Gabor Grothendieck
given promise is evaluating in) and possibly for writing programs as well. On 9/27/07, Luke Tierney <[EMAIL PROTECTED]> wrote: > On Wed, 26 Sep 2007, Gabor Grothendieck wrote: > > > I thought that perhaps the behavior in the previous post, > > while inconsistent with the do

Re: [Rd] delayedAssign

2007-09-27 Thread Gabor Grothendieck
ables that are being evaluated whereas the current environment may or may not have variables of those names. In order to try this and variations on this we need the three wish list items. On 9/27/07, Luke Tierney <[EMAIL PROTECTED]> wrote: > On Thu, 27 Sep 2007, Gabor Grothendieck wrote

Re: [Rd] Aggregate factor names

2007-09-27 Thread Gabor Grothendieck
You can do this: aggregate(iris[-5], iris[5], mean) On 9/27/07, Mike Lawrence <[EMAIL PROTECTED]> wrote: > Hi all, > > A suggestion derived from discussions amongst a number of R users in > my research group: set the default column names produced by aggregate > () equal to the names of the objec

Re: [Rd] Aggregate factor names

2007-09-27 Thread Gabor Grothendieck
x27;punished' for being explicit in calling > aggregate. > > > On 27-Sep-07, at 1:06 PM, Gabor Grothendieck wrote: > > > You can do this: > > > > aggregate(iris[-5], iris[5], mean) > > > > > > On 9/27/07, Mike Lawrence <[EMAIL PROTECTED]> w

[Rd] as.Date.numeric

2007-09-29 Thread Gabor Grothendieck
I noticed that R 2.7.0 will have as.Date.numeric with a second non-optional origin argument. Frankly I would prefer that it default to the Epoch since its a nuisance to specify but at the very least I think that .Epoch should be provided as a builtin variable.

[Rd] Ryacas check

2007-09-30 Thread Gabor Grothendieck
When I do Rcmd check Ryacas on my Windows Vista system under R version 2.6.0 beta (2007-09-23 r42958) it checks out fine but here: http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html http://cran.r-project.org/bin/windows/contrib/2.5/check/Ryacas-check.log it complains

Re: [Rd] Ryacas check

2007-09-30 Thread Gabor Grothendieck
ECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Gabor Grothendieck wrote: > > When I do > > > >Rcmd check Ryacas > > > > on my Windows Vista system under > > > >R version 2.6.0 beta (2007-09-23 r42958) > >

[Rd] LazyLoad changes the class of objects

2007-10-12 Thread Gabor Grothendieck
Consider a package that this DESCRIPTION file: --- Package: tester Version: 0.1-0 Date: 2007-10-12 Title: Prototype object-based programming Author: Gabor Grothendieck Maintainer: Gabor Grothendieck <[EMAIL PROTECTED]> Description: test LazyLoad: true Depends: R (>= 2.6.0) License: GPL2

Re: [Rd] Extending deriv3()

2007-10-15 Thread Gabor Grothendieck
If you are modifying it it would also be nice to add { to the derivative table so one can write this: f <- function(x) x*x deriv(body(f), "x", func = TRUE) Currently, one must do: deriv(body(f)[[2]], "x", func = TRUE) On 10/15/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On M

<    2   3   4   5   6   7   8   9   10   11   >