Re: [Rd] package building problem under Windows Vista

2008-04-20 Thread Gabor Grothendieck
There does seem to be some general problem associated with Sweave and graphics when I try it on my Vista system with [1] R version 2.7.0 RC (2008-04-17 r45367) Using tradeCosts-article.Rnw from the tradeCosts package: setwd(path.to.tradeCosts-article.Rnw) Sweave(tradeCosts-article.Rnw)

Re: [Rd] package building problem under Windows Vista

2008-04-19 Thread Gabor Grothendieck
Note that CRAN is also having a problem with the package so its not just you: http://cran.r-project.org/bin/windows/contrib/2.7/check/tm-check.log I also have a problem with the vignettes (note there are two) but as with you this works: Rcmd build --no-vignettes tradeCosts I don't have any

[Rd] Progress window on updating

2008-04-19 Thread Gabor Grothendieck
I am updating some packages using the packages menu and noticed that the progress window says 100% in the title done all the time. It works, its just that the progress percentage is wrong. __ R-devel@r-project.org mailing list

Re: [Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Gabor Grothendieck
Try this: Axis.AsIs = AxisFUN = function(x=NULL, at=NULL, ..., side, labels=TRUE) { if (is.null(at)) at = pretty(x) axis(at=at, ..., side=side, labels=labels, col=red, lwd=5) } plot(I(1:10)) On Mon, Apr 7, 2008 at 7:22 AM, Sklyar, Oleg (MI London) [EMAIL PROTECTED] wrote: Dear list: I

Re: [Rd] [R] How to improve the OPTIM results

2008-04-06 Thread Gabor Grothendieck
On Sun, Apr 6, 2008 at 12:59 PM, Kurt Hornik [EMAIL PROTECTED] wrote: Dirk Eddelbuettel writes: On 6 April 2008 at 08:37, Spencer Graves wrote: | moved to R-devel [...] | However, the comment from Hans Borchers (below) raises a related | question: What might be the best way to

Re: [Rd] __FILE__ for R

2008-04-04 Thread Gabor Grothendieck
Although its kludgy this previously (and still works) too: parent.frame(2)$ofile if called from top level within a sourced file. On Fri, Apr 4, 2008 at 11:50 AM, hadley wickham [EMAIL PROTECTED] wrote: Sorry, that should be: FILE - (function() { attr(body(sys.function()), srcfile)

Re: [Rd] R CMD check should check date in description

2008-04-04 Thread Gabor Grothendieck
I think its somewhat inspiring to be able to get R CMD check to the point that there are no warnings so having a situation where a warning is ok would interfere with that. On Fri, Apr 4, 2008 at 3:54 PM, hadley wickham [EMAIL PROTECTED] wrote: I recently thought about this. I see several

Re: [Rd] callCC in 2.7.0

2008-04-01 Thread Gabor Grothendieck
: callcc is similar to the yield keyword in python and c# it lets you define e.g. a generator of lists of numbers. Gabor Grothendieck wrote: Would anyone like to explain if callCC in R 2.7.0 gives anything that on.exit does not already provide? It seems that the exit

Re: [Rd] data(lh) time serie parameters

2008-03-30 Thread Gabor Grothendieck
On Sun, Mar 30, 2008 at 5:52 AM, Jean lobry [EMAIL PROTECTED] wrote: Dear all, I'm confused by the time serie parameters in data(lh) : sueoka:~ lobry$ R --vanilla --quiet tsp(lh) [1] 1 48 1 because documentation says: QUOTE A regular time series giving the luteinizing hormone in

[Rd] callCC in 2.7.0

2008-03-30 Thread Gabor Grothendieck
Would anyone like to explain if callCC in R 2.7.0 gives anything that on.exit does not already provide? It seems that the exit condition once defined cannot be added to overridden whereas with on.exit multiple on.exit's add additional on.exits rather than being ignored. Is this important?

Re: [Rd] callCC in 2.7.0

2008-03-30 Thread Gabor Grothendieck
I think the only relationship to that is the name since it does not appear to allow one to leave a function in the middle of its processing and re-enter it back at that point -- which is what would be needed. On Sun, Mar 30, 2008 at 12:04 PM, [EMAIL PROTECTED] wrote: Would anyone like to

Re: [Rd] callCC in 2.7.0

2008-03-30 Thread Gabor Grothendieck
it can't. On Sun, Mar 30, 2008 at 12:34 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: I think the only relationship to that is the name since it does not appear to allow one to leave a function in the middle of its processing and re-enter it back at that point -- which is what would be needed

Re: [Rd] callCC in 2.7.0

2008-03-30 Thread Gabor Grothendieck
Sorry it should be as follows: fib - function(i, a = 0, b = 1) { if (i == 0) b else fib(i-1, b, a+b) } Now, how do we transform that to use callCC? On Sun, Mar 30, 2008 at 1:42 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: OK. Can you show code to implement the tail recursive version

Re: [Rd] callCC in 2.7.0

2008-03-30 Thread Gabor Grothendieck
, 2008 at 1:14 PM, Luke Tierney [EMAIL PROTECTED] wrote: On Sun, 30 Mar 2008, Gabor Grothendieck wrote: Also in trying it out again it seems that its not like on.exit but more like return: Yes -- if you can point out what in the documentation ever gave the idea it might be like on.exit

Re: [Rd] callCC in 2.7.0

2008-03-30 Thread Gabor Grothendieck
not create a new stack instance? On Sun, Mar 30, 2008 at 1:31 PM, Luke Tierney [EMAIL PROTECTED] wrote: On Sun, 30 Mar 2008, Gabor Grothendieck wrote: I think the only relationship to that is the name since it does not appear to allow one to leave a function in the middle of its processing and re

Re: [Rd] callCC in 2.7.0

2008-03-30 Thread Gabor Grothendieck
Thanks. So its intended to jump straight out of deeply nested calls without having to manage the unwinding. On Sun, Mar 30, 2008 at 4:22 PM, Luke Tierney [EMAIL PROTECTED] wrote: On Sun, 30 Mar 2008, Gabor Grothendieck wrote: Sorry it should be as follows: fib - function(i, a = 0, b = 1

Re: [Rd] cpu usage high with windows change dir / winDialogString (PR#11045)

2008-03-29 Thread Gabor Grothendieck
On Sat, Mar 29, 2008 at 12:06 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 28/03/2008 12:05 PM, [EMAIL PROTECTED] wrote: Good afternoon, This is possibly a windows only bug, definitely of comparatively low importance - but for the sake of completeness here we go. I've searched

Re: [Rd] cpu usage high with windows change dir / winDialogString (PR#11045)

2008-03-29 Thread Gabor Grothendieck
On Sat, Mar 29, 2008 at 12:32 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 29/03/2008 12:23 PM, Gabor Grothendieck wrote: On Sat, Mar 29, 2008 at 12:06 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 28/03/2008 12:05 PM, [EMAIL PROTECTED] wrote: Good afternoon, This is possibly

[Rd] cut.Date and cut.POSIXt problem

2008-03-18 Thread Gabor Grothendieck
cut.Date and cut.POSIXt indicate that the breaks argument can be an integer followed by a space followed by year, etc. but it seems the integer is ignored. For example, I assume that breaks = 3 months is supposed to cut it into quarters but, in fact, it cuts it into months as if 3 had not been

Re: [Rd] cut.Date and cut.POSIXt problem

2008-03-18 Thread Gabor Grothendieck
-devel. Will take a look. -roger Gabor Grothendieck wrote: cut.Date and cut.POSIXt indicate that the breaks argument can be an integer followed by a space followed by year, etc. but it seems the integer is ignored. For example, I assume that breaks = 3 months is supposed to cut

Re: [Rd] cut.Date and cut.POSIXt problem

2008-03-18 Thread Gabor Grothendieck
By the way, it would be nice if the breaks argument accepted the word quarter directly since its quite a common break to need when using dates. On Tue, Mar 18, 2008 at 2:29 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: I am using [1] R version 2.6.2 alpha (2008-01-26 r44181) and also get

Re: [Rd] extract function [ and empty index

2008-03-09 Thread Gabor Grothendieck
Use TRUE. On Sun, Mar 9, 2008 at 5:05 AM, Laurent Gautier [EMAIL PROTECTED] wrote: Dear list, I am having a question regarding the extract function [. The man page says that one usage with k-dimensional arrays is to specify k indices to [, with an empty index indicating that all entries in

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Gabor Grothendieck
On Sun, Mar 9, 2008 at 6:27 PM, hadley wickham [EMAIL PROTECTED] wrote: Yes. The ability to plot things on top of each other is important. The simplicity created by having a single interface for adding to plots outweighs the complexity of yet another parameter. The add parameter

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Gabor Grothendieck
Its not a matter of desirable or not -- its a matter that its a different point. The par(new= ) to get an old graph is completely confusing and its annoying that one has to suddenly switch to lines and points and cannot consistently use plot. That remains true whether or not there is auto

Re: [Rd] merging environments

2008-03-07 Thread Gabor Grothendieck
On Fri, Mar 7, 2008 at 3:15 PM, hadley wickham [EMAIL PROTECTED] wrote: 2008/3/7 Ben Bolker [EMAIL PROTECTED]: Despite the spirited arguments of various R-core folks who feel that mle() doesn't need a data argument, and that users would be better off learning to deal with function

Re: [Rd] Warnings generated by log2()/log10() are really large/takes a long time to display

2008-02-27 Thread Gabor Grothendieck
On Wed, Feb 27, 2008 at 5:50 AM, Henrik Bengtsson [EMAIL PROTECTED] wrote: On Wed, Feb 27, 2008 at 12:56 AM, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 27 Feb 2008, Martin Maechler wrote: Thank you Henrik, HenrikB == Henrik Bengtsson [EMAIL PROTECTED] on Tue, 26

Re: [Rd] Unix-like touch to update modification timestamp of file?

2008-02-27 Thread Gabor Grothendieck
If you only need Windows then this will do it even without RTools: shell(copy /b /v myfile +,,nul) On Wed, Feb 27, 2008 at 11:12 AM, Earl F. Glynn [EMAIL PROTECTED] wrote: Henrik Bengtsson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... is it possible to update the

Re: [Rd] how to write dput-able objects

2008-02-25 Thread Gabor Grothendieck
You might want to look at the proto package. proto objects won't immediately dput either but it would not be hard to convert them to restorable character strings because the proto methods normally have their object as their parent environment so its implicit in the definition. First define a

Re: [Rd] how to write dput-able objects

2008-02-25 Thread Gabor Grothendieck
be it. Anyway, it is so close to what I need that I should be able to hack someting to make it work for my purposes. Thanks again! Vadim From: Gabor Grothendieck [EMAIL PROTECTED] Sent: Monday, February 25, 2008 12:16 PM To: Vadim Organovich Cc: r-devel@r

Re: [Rd] Aliasing a function

2008-02-23 Thread Gabor Grothendieck
formals can be used like this: f - g formals(f) - pairlist(a=1,b=2,c=3) On Sat, Feb 23, 2008 at 5:40 PM, hadley wickham [EMAIL PROTECTED] wrote: A simple way to alias a function is to do : g - function(a = 1, b = 2, c = 3) a + b * c f - function(...) g(...) but formals (etc) is no longer

Re: [Rd] Aliasing a function

2008-02-23 Thread Gabor Grothendieck
I assume he wants to be able to change the formals although its confusing since the example uses the same formals in both cases. On Sat, Feb 23, 2008 at 6:32 PM, John Fox [EMAIL PROTECTED] wrote: Dear Hadley, Why not just f - g ? Regards, John John Fox,

[Rd] NEWS and ChangeLog in available.packages()

2008-02-18 Thread Gabor Grothendieck
With the newly available NEWS and ChangeLog links on the CRAN pages for packages it would be nice if available.packages() gave information on those. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] NEWS and ChangeLog in available.packages()

2008-02-18 Thread Gabor Grothendieck
On Feb 18, 2008 11:59 AM, Martin Maechler [EMAIL PROTECTED] wrote: GaGr == Gabor Grothendieck [EMAIL PROTECTED] on Mon, 18 Feb 2008 10:19:05 -0500 writes: GaGr With the newly available NEWS and ChangeLog links on GaGr the CRAN pages for packages it would be nice if GaGr

Re: [Rd] Arithmetic bug? (found when use POSIXct) (PR#10776)

2008-02-17 Thread Gabor Grothendieck
OK. Good point. Note that that article was written 4 years ago when R was at version 1.9 and POSIXt did not fully support subseconds. At that time, POSIXct could represent subseconds internally but it was not used as POSIXlt did not yet support it and that and the associated digits.sec option

Re: [Rd] Arithmetic bug? (found when use POSIXct) (PR#10776)

2008-02-16 Thread Gabor Grothendieck
See FAQ 7.31 or explain what you believe to be the problem. On Feb 16, 2008 1:05 PM, [EMAIL PROTECTED] wrote: Full_Name: Bo Zhou Version: 2.6.1 (2007-11-26) OS: Windows XP Submission from: (NULL) (207.237.54.242) Hi, I found an arithmetic problem when I'm doing something with POSIXct

Re: [Rd] assigning NULLs to elements of a list

2008-02-13 Thread Gabor Grothendieck
But what about by name? a - list(a = 1, b = 2, c = 3) a$b - NULL On Feb 13, 2008 9:39 AM, Oleg Sklyar [EMAIL PROTECTED] wrote: Hmm, I think the pretty traditional R style does the job... a = list(1,2,3) a[-2] So I really do not see a good reason for doing a[2] = NULL instead of a =

[Rd] lm with factors for which only one level occurs

2008-02-08 Thread Gabor Grothendieck
Consider the following: lm(conc ~ Type, CO2, subset = Plant == Quebec) Error in `contrasts-`(`*tmp*`, value = contr.treatment) : contrasts can be applied only to factors with 2 or more levels Here Type is a factor for which only one level occurs within the Quebec subset. This is something

[Rd] Choosing CRAN Mirror in Windows GUI

2008-02-07 Thread Gabor Grothendieck
When you choose the CRAN Mirror in the Windows GUI Packages menu in R version 2.6.2 alpha (2008-01-26 r44181) the first mirror is highlighted when you open it even if the mirror had been set. If the mirror had previously been set then that previously set mirror should be highlighted rather than

Re: [Rd] a != a*1 != a+0 != +a

2008-02-04 Thread Gabor Grothendieck
I don't think global options are desirable. I would make your operators work in a single way and if the user wants a different way he can call whatever functions you provide directly instead of using the operators. If you really need two ways with operators I would define a subclass with

Re: [Rd] Pb with lapply()

2008-01-31 Thread Gabor Grothendieck
The problem of promises not being evaluated in lists has been discussed before. I think its fixed in the development version of R. See r44139 on Jan 24, 2008 in http://developer.r-project.org/R.svnlog.2007 On Jan 31, 2008 1:26 PM, [EMAIL PROTECTED] wrote: Hi, If needed, lapply() tries to

Re: [Rd] Pb with lapply()

2008-01-31 Thread Gabor Grothendieck
(list(x = 7), .Names = x) z[[1]] == 7 force(z[[1]]) == 7 On Jan 31, 2008 2:33 PM, [EMAIL PROTECTED] wrote: Hi Gabor, Quoting Gabor Grothendieck [EMAIL PROTECTED]: The problem of promises not being evaluated in lists has been discussed before. I think its fixed in the development version

Re: [Rd] Feature request: about lag(), which.min() and cat().

2008-01-31 Thread Gabor Grothendieck
admit values of length 1, which would give the same result as embed() but keep the class. In his wish list of 1 January 2008 (point 8), Gabor Grothendieck spoke about a function Lag. Maybe also a function lags otherwise if the idea of length(k)1 is not good? It would be nice. Note that lag.zoo

Re: [Rd] [wishlist, patch] Removing .bzr/ directory when calling R CMD build (PR#10625)

2008-01-23 Thread Gabor Grothendieck
If you place an .Rbuildignore file in the top level of your package with this line single line as its contents: [.]bzr$ then the .bzr file will not be included. On Jan 23, 2008 1:45 PM, [EMAIL PROTECTED] wrote: Full_Name: Ben Goodrich Version: 2.6.1 OS: Debian Submission from: (NULL)

Re: [Rd] [wishlist, patch] Removing .bzr/ directory when calling R CMD build (PR#10625)

2008-01-23 Thread Gabor Grothendieck
On Jan 23, 2008 2:23 PM, Ben Goodrich [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: If you place an .Rbuildignore file in the top level of your package with this line single line as its contents: [.]bzr$ then the .bzr file will not be included. Thank you for the suggestion

Re: [Rd] seekViewport error

2008-01-23 Thread Gabor Grothendieck
On Jan 23, 2008 9:38 PM, Paul Murrell [EMAIL PROTECTED] wrote: Hi Gabor Grothendieck wrote: Why does the seekViewport at the bottom give an error? Because the viewport is popped after GRID.cellGrob.84 is drawn. grid.ls() shows the viewport because it recurses down into the legend frame

Re: [Rd] experiments with slot functions and possible problems NOTE

2008-01-21 Thread Gabor Grothendieck
() ) } ## 2c) or use an alternative way with a special function ## addtoenv, suggested by Gabor Grothendieck some times ago: addtoenv - function(L, p = parent.frame()) { for(nm in names(L)) { assign(nm, L[[nm]], p) environment(p[[nm]]) - p } L } makefun3 - function(flist

Re: [Rd] Great tool

2008-01-21 Thread Gabor Grothendieck
Tracking down the free variables in a function when reworking old code. On Jan 21, 2008 12:41 PM, Charles C. Berry [EMAIL PROTECTED] wrote: On Sun, 20 Jan 2008, Gabor Grothendieck wrote: I agree. Its incredibly useful. OK gentlemen, you have piqued my curiosity. Can you give an example

Re: [Rd] Updating library

2008-01-19 Thread Gabor Grothendieck
). This is covered in rw-FAQ Q2.24. On Fri, 18 Jan 2008, Gabor Grothendieck wrote: On Vista my R installation is in C:\Program Files\R\R-2.6.0 and there is a library here: %userprofile%\Documents\R\win-library\2.6 If I use the GUI Packages menu to update my library it works ok _except_

Re: [Rd] Updating library

2008-01-19 Thread Gabor Grothendieck
will succeed. Best, uwe -p On Fri, 18 Jan 2008, Gabor Grothendieck wrote: On Vista my R installation is in C:\Program Files\R\R-2.6.0 and there is a library here: %userprofile%\Documents\R\win-library\2.6 If I use the GUI Packages menu to update my library

[Rd] Updating library

2008-01-18 Thread Gabor Grothendieck
On Vista my R installation is in C:\Program Files\R\R-2.6.0 and there is a library here: %userprofile%\Documents\R\win-library\2.6 If I use the GUI Packages menu to update my library it works ok _except_ for any packages such as lattice and the VR bundle that come with R. For those I get

Re: [Rd] as.function()

2008-01-14 Thread Gabor Grothendieck
On Jan 14, 2008 6:50 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: Robin Hankin wrote: Hi [this after some considerable thought as to R-help vs R-devel] I want to write a (S3) method for as.function(); toy example follows. Given a matrix a, I need to evaluate trace(ax) as a

Re: [Rd] as.function()

2008-01-14 Thread Gabor Grothendieck
The gsubfn package can do something like that too. If you preface a function with fn$ then it will interpret certain formula arguments as functions. If all we want is the function itself we can use force, the identity function, to recover it: library(gsubfn) fn$force(~ 2*x + 3*y^2) function

Re: [Rd] R Bugs link broken

2008-01-11 Thread Gabor Grothendieck
With the dash it goes to section 9.1 entitled R Bugs but with the %20 it goes to the top. It should go to 9.1; however, it looks likes someone fixed it since I posted. On Jan 9, 2008 11:54 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: The link to R Bugs in the posting guide http://www.r

[Rd] R Bugs link broken

2008-01-09 Thread Gabor Grothendieck
The link to R Bugs in the posting guide http://www.r-project.org/posting-guide.html is broken. The - that should be in the link: http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Bugs is currently %20: http://cran.r-project.org/doc/FAQ/R-FAQ.html#R%20Bugs

Re: [Rd] read.table: aborting based on a time constraint

2008-01-09 Thread Gabor Grothendieck
That was supposed to be file.info()$size On Jan 9, 2008 3:27 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Use file.file()$size to find out how large the file is and skip files larger than some cutoff. On Jan 9, 2008 2:01 PM, Derek Stephen Elmerick [EMAIL PROTECTED] wrote: Hello – I

Re: [Rd] nls (with SSlogis model and upper limit) never returns (PR#10544)

2008-01-05 Thread Gabor Grothendieck
On my Windows Vista system it returns an answer: values - list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, + 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, + 0.612, 0.556, 0.4025, 0.173)) y.max - max(values$y) model - nls(y ~ SSlogis(x, asym,

[Rd] Typo in DateTimeClasses.Rd

2008-01-03 Thread Gabor Grothendieck
In: trunk/src/library/base/man/DateTimeClasses.Rd this: \section{Sub-section Accuracy}{ should be \section{Sub-second Accuracy}{ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Wish List

2008-01-01 Thread Gabor Grothendieck
Most of the items on this list have been mentioned before but it may be useful to see them altogether and at any rate every year I have posted my R wishlist at the beginning of the year. High priority items pertain to the foundations of R (promises, environments) since those form the basis of

[Rd] Predictable grid names

2007-12-26 Thread Gabor Grothendieck
One thing that makes modifying lattice grid objects difficult is that if you create the same plot twice you get different grid names for some grid objects: 1. I wonder if there is some possibility in grid to reset the names after a grid.newpage(), say, so that one can get predictable names or

[Rd] seekViewport error

2007-12-26 Thread Gabor Grothendieck
Why does the seekViewport at the bottom give an error? xyplot(Sepal.Length ~ Sepal.Width, iris, group = Species, col = 11:13, + auto.key = TRUE) grid.ls(view = TRUE) ROOT GRID.rect.89 plot1.toplevel.vp plot1.xlab.vp plot1.xlab 1 plot1.ylab.vp plot1.ylab 1

Re: [Rd] Wrong length of POSIXt vectors (PR#10507)

2007-12-15 Thread Gabor Grothendieck
If it were simply deprecated and then changed then everyone using it would get a warning during the period of deprecation so it would not be so bad. Given that its current behavior is not very useful I suspect its not widely used anyways. | haven't followed the whole discussion so sorry if these

Re: [Rd] creating lagged variables

2007-12-13 Thread Gabor Grothendieck
The problem is the representation. If we transform it into a zoo time series, z, with one series per column and one time point per row then we can just merge the series with its lag. DF - data.frame(id = c(1, 1, 1, 2, 2, 2), time = c(1, 2, + 3, 1, 2, 3), value = c(-0.56047565, -0.23017749,

Re: [Rd] List comprehensions for R

2007-12-09 Thread Gabor Grothendieck
That seems quite nice. Note that there has been some related code posted. See: http://tolstoy.newcastle.edu.au/R/help/03b/6406.html which discusses some R idioms for list comprehensions. Also the gsubfn package has some functionality in this direction. We preface any function with fn$ to allow

Re: [Rd] Building packages

2007-12-07 Thread Gabor Grothendieck
An svn checkout directory can contain a mix of files that are mirrored in the svn and not mirrored. In particular, if you add a new file into your checkout directory it will not automatically go into the repository on your next commit unless you specifically place that file under svn control so

Re: [Rd] suggested modification to the 'mle' documentation?

2007-12-07 Thread Gabor Grothendieck
On Dec 7, 2007 8:43 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 12/7/2007 8:10 AM, Peter Dalgaard wrote: Ben Bolker wrote: At this point I'd just like to advertise the bbmle package (on CRAN) for those who respectfully disagree, as I do, with Peter over this issue. I have added a

Re: [Rd] suggested modification to the 'mle' documentation?

2007-12-07 Thread Gabor Grothendieck
On Dec 7, 2007 8:10 AM, Peter Dalgaard [EMAIL PROTECTED] wrote: Ben Bolker wrote: At this point I'd just like to advertise the bbmle package (on CRAN) for those who respectfully disagree, as I do, with Peter over this issue. I have added a data= argument to my version of the function

Re: [Rd] suggested modification to the 'mle' documentation?

2007-12-06 Thread Gabor Grothendieck
The closure only works if you are defining the inner function yourself. If you are not then its yet more work to redefine the environment of the inner function or other workaround. On Dec 6, 2007 6:01 PM, Peter Dalgaard [EMAIL PROTECTED] wrote: Spencer Graves wrote: Hello: I wish to

Re: [Rd] faqs

2007-11-20 Thread Gabor Grothendieck
And one other thing. In the GNU docs it says that if your NEWS file gets too big you can create an ONEWS file for the really old stuff. Is ONEWS supported too? On Nov 16, 2007 11:12 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: On Nov 15, 2007 10:51 AM, Gabor Grothendieck [EMAIL PROTECTED

Re: [Rd] faqs

2007-11-16 Thread Gabor Grothendieck
On Nov 15, 2007 10:51 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: On Nov 15, 2007 9:57 AM, Simon Urbanek [EMAIL PROTECTED] wrote: On Nov 14, 2007, at 11:55 PM, Gabor Grothendieck wrote: inst/NEWS would have the advantage of consistency with R itself which also has a NEWS file

Re: [Rd] library path in Rd link

2007-11-15 Thread Gabor Grothendieck
I think that's right -- it only works on NTFS systems. This page refers to it as an NTFS symbolic link: http://en.wikipedia.org/wiki/NTFS_symbolic_link On Nov 14, 2007 10:00 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 14/11/2007 7:44 PM, Gabor Grothendieck wrote: On Nov 14, 2007 4:36 PM

Re: [Rd] faqs

2007-11-15 Thread Gabor Grothendieck
On Nov 15, 2007 9:57 AM, Simon Urbanek [EMAIL PROTECTED] wrote: On Nov 14, 2007, at 11:55 PM, Gabor Grothendieck wrote: inst/NEWS would have the advantage of consistency with R itself which also has a NEWS file. I vote for NEWS for reasons above plus because that's what I use in my

Re: [Rd] When to use LazyLoad, LazyData and ZipData?

2007-11-14 Thread Gabor Grothendieck
On Nov 14, 2007 7:01 AM, Bjørn-Helge Mevik [EMAIL PROTECTED] wrote: Dear developeRs, I've searched the documentation, FAQ, and mailing lists, but haven't found the answer(*) to the following: When should one specify LazyLoad, LazyData, and ZipData? And what is the default if they are left

Re: [Rd] library path in Rd link

2007-11-14 Thread Gabor Grothendieck
On Nov 14, 2007 4:36 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: On Unix-alikes, the workaround is to build soft links to all the packages in a standard location; but soft links don't work on Windows (and we don't want to get into the almost-undocumented hard links that exist on some Windows

Re: [Rd] faqs

2007-11-14 Thread Gabor Grothendieck
Another possibility is to just place it at the end of the vignette. That is where it is in the proto package: http://cran.r-project.org/doc/vignettes/proto/proto.pdf Package documentation is already quite scattered and adding a faq() command would add just one more thing one has to do. Here are

Re: [Rd] How to overload the assignment operator?

2007-11-13 Thread Gabor Grothendieck
Check out the g.data package in case that's what you are looking for. It uses promises until the data is actually used. On Nov 13, 2007 9:19 AM, Jens Oehlschlägel [EMAIL PROTECTED] wrote: Thanks Matthias, are you looking for setReplaceMethod? So far the package I m writing has avoided

Re: [Rd] years() in chron package not working in R 2.6.0 (PR#10415)

2007-11-10 Thread Gabor Grothendieck
In chron, ?year says x must be a dates object and its not in the code below. On Nov 9, 2007 3:55 PM, [EMAIL PROTECTED] wrote: I loaded package chron in a newly installed version of R 2.6.0 and the years() function would not work. (This worked in 2.5). =20 x-as.Date(2006-01-01)

Re: [Rd] pairs, par

2007-10-29 Thread Gabor Grothendieck
This hack will disable the on.exit temporarily: pairs.data.frame - function(x, ...) { on.exit - function(...) {} environment(pairs.default) - environment() pairs.default(x, ...) } pairs(iris) par(usr) # add points to lower right square points(1:10/10, 1:10/10, col = red)

Re: [Rd] LazyLoad changes the class of objects

2007-10-17 Thread Gabor Grothendieck
On 10/17/07, Henrik Bengtsson [EMAIL PROTECTED] wrote: Yes (on the yes), to second Luke. Here is John Chambers' comment when I was bitten by the same bug a while ago: http://tolstoy.newcastle.edu.au/R/devel/02b/0524.html See also Peter Dalgaard's follow up suggesting to wrap up the

[Rd] Withdrawing SaveImage

2007-10-17 Thread Gabor Grothendieck
I noticed this under R 2.7.0 NEWS: o In package installation, SaveImage: yes is defunct and lazyloading is attempted instead. I think its premature to make SaveImage defunct especially when: 1. there is a bug that would be triggered in some packages by automatically using LazyLoad

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 Mon, 15

[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

[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

Re: [Rd] Ryacas check

2007-09-30 Thread Gabor Grothendieck
: -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) it checks out fine but here: http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html

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

Re: [Rd] delayedAssign

2007-09-27 Thread Gabor Grothendieck
a 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 documentation, was not all

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

Re: [Rd] Aggregate factor names

2007-09-27 Thread Gabor Grothendieck
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] wrote: Hi all, A suggestion derived from discussions amongst a number of R users in my research group: set

Re: [Rd] delayedAssign

2007-09-26 Thread Gabor Grothendieck
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: e - (function(x, y = 1, z) environment())(1+2, y, {cat( HO! ); pi+2}) (le - as.list(e)) # evaluates the promises $x promise: 0x032b31f8 $y

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

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

[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 promise: 0x032b31f8 $y promise: 0x032b3230 $z promise: 0x032b3268 which contrary to the comment appears unevaluated. Is

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 r42791) That is substitute(x) gives x, not msg. On 9/19/07, Gabor Grothendieck [EMAIL

[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

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 adding to a package is possible, it is now very hard

Re: [Rd] r cmd build

2007-09-16 Thread Gabor Grothendieck
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 install --docs=normal myPackage to avoid the message

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's what I have been doing and that does

[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

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

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 distributed as an R package. So far, I've decided to use

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