Re: [Rd] Fwd: Digest package - make digest generic?

2007-10-16 Thread hadley wickham
On 10/16/07, Roger Peng [EMAIL PROTECTED] wrote: My understanding was that Hadley wanted 'digest' to operate on part of an object rather than on the entire, which might contain uninteresting or irrelevant details. For example, if we had a - structure(list(x = 1, y = 2), class = foo) b -

Re: [Rd] boxplot() confuses x- and y-axes (PR#10345)

2007-10-15 Thread hadley wickham
So given the help file, we should consider dropping the whole ``along the boxplot'' idea? {{well, yes, we should drop traditional graphics and work with grid-based graphical objects (grobs) that can be drawn vertically or horizontally, e.g., in lattice or (most probably) ggplot2 }}

Re: [Rd] Digest package - make digest generic?

2007-10-15 Thread hadley wickham
On 10/15/07, Henrik Bengtsson [EMAIL PROTECTED] wrote: [As agreed, CC:ing r-devel since others might be interested in this as well.] Hi. On 10/15/07, Dirk Eddelbuettel [EMAIL PROTECTED] wrote: Hi Hadley, On 15 October 2007 at 09:51, hadley wickham wrote: | Would you consider making

Re: [Rd] rggobi not in bin/macosx/universal/contrib/2.6/PACKAGES on CRAN

2007-09-26 Thread hadley wickham
On 9/26/07, Herve Pages [EMAIL PROTECTED] wrote: Hi Simon, Simon Urbanek wrote: Actually, the fact that the tar ball is there must be a mirroring problem, because it's not on the master CRAN server. You should fix your mirror - objects may appear closer ... ;) Yesterday, before I

Re: [Rd] rggobi not in bin/macosx/universal/contrib/2.6/PACKAGES on CRAN

2007-09-25 Thread hadley wickham
On 9/25/07, Simon Urbanek [EMAIL PROTECTED] wrote: On Sep 25, 2007, at 12:58 PM, Herve Pages wrote: Hi, R-2.6 + install.packages() doesn't find rggobi on Mac OS X. The .tgz file is here: http://cran.fhcrc.org/bin/macosx/universal/contrib/2.6/ but it is not listed in the

Re: [Rd] rggobi not in bin/macosx/universal/contrib/2.6/PACKAGES on CRAN

2007-09-25 Thread hadley wickham
On 9/25/07, Simon Urbanek [EMAIL PROTECTED] wrote: On Sep 25, 2007, at 4:33 PM, hadley wickham wrote: On 9/25/07, Simon Urbanek [EMAIL PROTECTED] wrote: On Sep 25, 2007, at 12:58 PM, Herve Pages wrote: Hi, R-2.6 + install.packages() doesn't find rggobi on Mac OS X. The .tgz file

Re: [Rd] Date vs date

2007-09-14 Thread hadley wickham
3. temp - as.Date('1990/1/1') - as.date('1953/2/5') sqrt(temp) Error in Math.difftime(temp3) : sqrtnot defined for difftime objects Minor bug: no space before the word 'not' Major: this shouldn't fail. Arguably, it should (Is this a difftime object? Which units?).

[Rd] Installing dependent packages

2007-08-19 Thread hadley wickham
Hi all, When installing ggplot2 on with install.packages(ggplot2, dep = T), the colorspace dependency doesn't get installed (see below for transcript from R session). The relevant lines from my description file are: Depends: R (= 2.4), grid, reshape (= 0.8.0), proto, splines, MASS,

Re: [Rd] Advice on parsing / overriding function calls

2007-08-16 Thread hadley wickham
What are you trying to defend against? A serious attacker could still use rm/assign/get/eval/... to circumvent your replaced functions. I think it would be very difficult (if not impossible) to prevent this from happening), especially if the user can load packages. Hadley On 8/16/07, Michael

Re: [Rd] Optimization in R

2007-08-07 Thread hadley wickham
On 8/7/07, Duncan Murdoch [EMAIL PROTECTED] wrote: Those are small parts of the calculation, not the whole thing. The original point was that optim() is a very thin wrapper around the code to do the optimization. I just don't see a need to make it more complicated so it can be used to wrap

Re: [Rd] Optimization in R

2007-08-06 Thread hadley wickham
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 list of ways to do a calculation passed as an argument (analogous to the method argument of optim), where the user is

[Rd] Cross-platform check for internet connection

2007-06-22 Thread hadley wickham
What's the recommended way to check if an internet connection is available across platforms? I was using is.null(nsl()) but this does not work on windows. Thanks, Hadley __ R-devel@r-project.org mailing list

Re: [Rd] Cross-platform check for internet connection

2007-06-22 Thread hadley wickham
On 6/22/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Fri, 22 Jun 2007, hadley wickham wrote: What's the recommended way to check if an internet connection is available across platforms? I was using is.null(nsl()) but this does not work on windows. I don't know a way to do

Re: [Rd] R 2.5.0 refuses to print enough digits to recover exact floating point values

2007-05-23 Thread hadley wickham
On 5/22/07, Uwe Ligges [EMAIL PROTECTED] wrote: Zack Weinberg wrote: I have noticed that in R 2.5.0, no method of textual output will print a double mode quantity with more than 15 digits after the decimal point. From the help page (?print.default) it appears that this is intentional,

Re: [Rd] R 2.5.0 refuses to print enough digits to recover exact floating point values

2007-05-23 Thread hadley wickham
On 5/23/07, hadley wickham [EMAIL PROTECTED] wrote: On 5/22/07, Uwe Ligges [EMAIL PROTECTED] wrote: Zack Weinberg wrote: I have noticed that in R 2.5.0, no method of textual output will print a double mode quantity with more than 15 digits after the decimal point. From the help

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

2007-05-23 Thread hadley wickham
On 5/23/07, Gabor Grothendieck [EMAIL PROTECTED] wrote: 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 [EMAIL PROTECTED] wrote: Andrew Clausen [EMAIL

Re: [Rd] R 2.5.0 refuses to print enough digits to recover exact floating point values

2007-05-23 Thread hadley wickham
I think this is a bug in the MacOS X runtime. I've checked the C99 standard, and can see no limits on the precision that you should be able to specify to printf. That seems quite possible - it's interesting that increasing the number of digits (ie 1e7 vs 1e6) doesn't crash, but takes up about

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

2007-05-18 Thread hadley wickham
On 5/18/2007 11:11 AM, hadley wickham wrote: 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 installed packages, or only those that are attached. Adding

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

2007-05-13 Thread hadley wickham
First, it was not clear that you are talking about the output of traceback(), which is _a representation of_ the call stack and depends on the details of deparsing. Given that there is a substantial delay in one case, and not in the other, I had assumed (perhaps falsely) that there was

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

2007-05-13 Thread hadley wickham
On 5/13/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Sun, 13 May 2007, hadley wickham wrote: First, it was not clear that you are talking about the output of traceback(), which is _a representation of_ the call stack and depends on the details of deparsing. Given

[Rd] Implicit vs explicit printing and the call stack

2007-05-12 Thread hadley wickham
Hi everyone, I've run into a bit of strange problem with implicit vs explicit printing and the call stack. I've included an example at the bottom of this email. The basic problem is that I have an S3 object with a print method. When the object is implicitly printed (ie. typed directly into the

Re: [Rd] directory/filename completion

2007-04-13 Thread hadley wickham
On 4/13/07, Roger Peng [EMAIL PROTECTED] wrote: I've noticed something recently in R-beta that has changed since R 2.4.1 and I'm not sure if it's a readline problem or an R problem. I am on a Linux FC5 system and in R 2.4.1 I could do load(my-directory/ and then hit TAB and it would list

Re: [Rd] R-Forge?

2007-04-06 Thread hadley wickham
On 4/6/07, Stefan Theussl [EMAIL PROTECTED] wrote: hadley wickham wrote: I have recently found RForge.net (http://www.rforge.net/) by Simon Urbanek and found out today that the site is accepting subscriptions. Great! However, browsing a bit on the site I found a link to another forge

Re: [Rd] Developer work cycle

2007-03-26 Thread hadley wickham
On 3/26/07, José Luis Aznarte M. [EMAIL PROTECTED] wrote: Hi! I've been browsing through the last months' archive and I can't find an answer to my question, so here it is (let's hope it's not too obvious): I'm working on extensions of an R library, and I would be very surprised if

Re: [Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-03 Thread hadley wickham
On 3/3/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Quoting [EMAIL PROTECTED]: In [.data.frame if you replace this: ... if (is.character(i)) { rows - attr(xx, row.names) i - pmatch(i, rows, duplicates.ok = TRUE) } ... by this ...

Re: [Rd] Depending on many packages: another best practice question

2007-02-26 Thread hadley wickham
You can use if(require(myPackage)) { ... } Yes, but the problem with this is that I now have the fact that this function requires that package stated in two places - in the body of the function, and in the examples - adding redundancy which makes maintenance harder. I guess what I really

Re: [Rd] Depending on many packages: another best practice question

2007-02-25 Thread hadley wickham
On 2/24/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Sat, 24 Feb 2007, hadley wickham wrote: ggplot currently requires 13 packages (grid, reshape, RColorBrewer, proto, splines, MASS, Hmisc, boot, butler, hexbin, mapproj, quantreg, sm). Some of these are absolutely necessary (eg

Re: [Rd] Functions that write functions in R packages

2007-02-24 Thread hadley wickham
/23/07, hadley wickham [EMAIL PROTECTED] wrote: Dear all, Another question related to my ggplot package: I have made some substantial changes to the backend of my package so that plot objects can now describe themselves much better. A consequence of this is that a number of convenience

Re: [Rd] Depending on many packages: another best practice question

2007-02-24 Thread hadley wickham
ggplot currently requires 13 packages (grid, reshape, RColorBrewer, proto, splines, MASS, Hmisc, boot, butler, hexbin, mapproj, quantreg, sm). Some of these are absolutely necessary (eg. proto), but most are used for one or two specific tasks (eg. boot is only used to get plogis, used

[Rd] Functions that write functions in R packages

2007-02-23 Thread hadley wickham
Dear all, Another question related to my ggplot package: I have made some substantial changes to the backend of my package so that plot objects can now describe themselves much better. A consequence of this is that a number of convenience functions that previously I wrote by hand, can now be

Re: [Rd] Functions that write functions in R packages

2007-02-23 Thread hadley wickham
On 2/23/07, Duncan Murdoch [EMAIL PROTECTED] wrote: On 2/23/2007 11:05 AM, hadley wickham wrote: Dear all, Another question related to my ggplot package: I have made some substantial changes to the backend of my package so that plot objects can now describe themselves much better

[Rd] Depending on many packages: another best practice question

2007-02-23 Thread hadley wickham
Dear all, ggplot currently requires 13 packages (grid, reshape, RColorBrewer, proto, splines, MASS, Hmisc, boot, butler, hexbin, mapproj, quantreg, sm). Some of these are absolutely necessary (eg. proto), but most are used for one or two specific tasks (eg. boot is only used to get plogis, used

Re: [Rd] Writing a package in which files must be sourced in a specific order

2007-02-22 Thread hadley wickham
What 'alphabetical order' is depends on the locale. In en_NZ g G, in C G g. So it is a rather slippery concept (and gets worse in non-English locales: 'aa' sorts after z in Danish). I only used characters a-z, so I didn't think that would be a problem. However, it turns out I had misnamed

Re: [Rd] trying to understand condition handling

2007-02-20 Thread hadley wickham
Since you have not told us what 'the documents' are (and only vaguely named one), do you not think your own documentation is inadequate? There are documents about the condition system on developer.r-project.org: please consult them. Where exactly? I tried: * reading

Re: [Rd] trying to understand condition handling

2007-02-20 Thread hadley wickham
Search for 'exception'. THe result points to http://www.stat.uiowa.edu/~luke/R/exceptions/simpcond.html Thanks Luke (and Brian). The note is entitled A Prototype of a Condition System for R - can we assume the actual implementation is as described? Thanks, Hadley

Re: [Rd] Writing R Extensions manual?

2006-11-23 Thread hadley wickham
It's very particular: Malformed Depends or Suggests or Imports or Enhances field. Offending entries: R (=2.4.0) Entries must be names of packages optionally followed by '=' or '=', white space, and a valid version number in parentheses. ^^^ You need a space after = Hadley

Re: [Rd] How to put my S4 class into data.frame

2006-11-04 Thread hadley wickham
OTOH, it's interesting that some methods to stick some S4 objects into a data frame do work fine , at least for the following case (R-script below) -- and I wonder if we (R developers) shouldn't think about more explicitly supporting this, e.g., by stating something like If an S4 object

Re: [Rd] R GUI API: suggestion for R function to put in there?

2006-10-29 Thread hadley wickham
- To execute R code contained in a string and return the result of this evaluation in a string (including presentation of error messages and warnings) exactly as if this was entered at the prompt. Duncan Murdoch is against such a kind of function (he says a GUI should not substitute to the R

Re: [Rd] Help for methods

2006-09-30 Thread hadley wickham
See the .helpForCall function in utils. It would recognize that the function was an S4 generic, and then work out the signature and look for matching help. I think working out the signature in the case above would require it to call lm(...). So there's a precedent for what I called a huge

[Rd] Warning: a final empty element has been omitted

2006-09-29 Thread hadley wickham
How can I suppress this warning? options(warn = -10) list(1,2,3,) Warning: a final empty element has been omitted the part of the args list of 'list' being evaluated was: (1, 2, 3, ) [[1]] [1] 1 [[2]] [1] 2 [[3]] [1] 3 suppressWarnings(list(1,)) Warning: a final empty element has been

Re: [Rd] Warning: a final empty element has been omitted

2006-09-29 Thread hadley wickham
R version.string R version 2.4.0 beta (2006-09-20 r39433) On 9/29/06, hadley wickham [EMAIL PROTECTED] wrote: How can I suppress this warning? options(warn = -10) list(1,2,3,) Warning: a final empty element has been omitted the part of the args list of 'list' being evaluated was: (1, 2

Re: [Rd] Help for methods

2006-09-29 Thread hadley wickham
I think the spirit of Hadley's request could be handled by introducing a declaration for S3 methods and by inserting S4-style alias{} lines into their documentation. For example, if a function, say setOldGeneric(summary), similar to setOldClass, informed the system that summary was an S3

Re: [Rd] Help for methods

2006-09-29 Thread hadley wickham
Yes, I agree that the current help system doesn't work very well on S3 methods. But I don't know how to fix it. I think the only way it could know what to do on a construction like ?summary(lm(...)) would be to actually evaluate summary(lm(...)) (or maybe just lm(...)), and I think that

Re: [Rd] Help for methods

2006-09-19 Thread hadley wickham
You are supposed to do: ?summary.lm ?summary.data.frame for S3 methods. The former works, the latter doesn't - which is probably considered a bug, but then the usage of some of the generics are probably considered obvious and fundamental enough that summary.data.frame doesn't really

Re: [Rd] Help for methods

2006-09-19 Thread hadley wickham
Well, I know that, and you know that, but how is anyone supposed to figure it out? It means that you need to have a working knowledge of the S3 and S4 class systems before you can use the help to reliably get the documentation you need. For S3 you do to understand that there are

Re: [Rd] Help for methods

2006-09-19 Thread hadley wickham
But you also have to be able to identify if it is a S3 function or an S4 method (or an ordinary function). Why not just type ?summary, which as I said, does tell you up front? If R can save the novice user a couple of steps in their search for help, why not do it? Getting documentation on

Re: [Rd] Help for methods

2006-09-19 Thread hadley wickham
I do not follow this. When I type ?summary.data.frame I get a summary help page where I can also find info about S3 method for class 'data.frame'. If I am not wrong it is \alias{summary.data.frame} that takes care of this. Oops, summary.data.frame was a bad example, except perhaps to

[Rd] Help for methods

2006-09-18 Thread hadley wickham
Help for help says: The 'topic' argument may also be a function call, to ask for documentation on a corresponding method. See the section on method documentation. and The authors of formal ('S4') methods can provide documentation on specific methods, as well as

Re: [Rd] Capturing warnings with capture.output

2006-09-05 Thread hadley wickham
) warning(Another warning.) print(3) }, warning = function(x) cat(x$message, \n)) ) print(out) On 8/29/06, hadley wickham [EMAIL PROTECTED] wrote: Is there any way to include warnings in the output from capture.output? eg: a - capture.output(warning(test

Re: [Rd] R-Project logo in SVG format

2006-08-31 Thread hadley wickham
It does look like it would be near-impossible to parameterise the logo efficiently into a vector format - all that shading and 3-d effect stuff. These days, most vector graphics programs provide gradient shading primitives - that's all you need to recreate most 3D effects. Hadley

[Rd] Capturing warnings with capture.output

2006-08-29 Thread hadley wickham
Is there any way to include warnings in the output from capture.output? eg: a - capture.output(warning(test)) all.equal(a, Warning message: \n test ) Conceptually, this seems like redirecting stderr to stdout, or somehow changing warning to simple print it's output. I've had a look at tryCatch

Re: [Rd] [R] Successive subsets from a vector?

2006-08-23 Thread hadley wickham
Providing the ability to write assignment functions that don't duplicate is a more urgent problem. You mean, for end-users? It can be done via primitives. Isn't this sort of a run-time optimisation? I thought R generally followed the functional programming model of immutable objects, copy

[Rd] Warning when indexing data.frame with FALSE

2006-07-31 Thread hadley wickham
data.frame()[] NULL data frame with 0 rows data.frame()[FALSE] Warning in is.na(nm) : is.na() applied to non-(list or vector) NULL data frame with 0 rows data.frame()[NULL] Warning in is.na(nm) : is.na() applied to non-(list or vector) NULL data frame with 0 rows Is this a bug? I wouldn't

Re: [Rd] Warning when indexing data.frame with FALSE

2006-07-31 Thread hadley wickham
Sorry, a better example is: data.frame(a=1)[FALSE] NULL data frame with 1 rows data.frame(a=1)[NULL] NULL data frame with 1 rows vs data.frame()[FALSE] Warning in is.na(nm) : is.na() applied to non-(list or vector) NULL data frame with 0 rows data.frame()[NULL] Warning in is.na(nm) :

[Rd] Modifying parsed code

2006-07-07 Thread hadley wickham
I would like to take this: .img(plot(1:10), filename=a) and produce plot(1:10) ie. whenever .img is used, I want to take the first argument and throw away everything else. (I am trying to produce a Sweave like environment in which I can apply certain functions, but not have them displayed in

Re: [Rd] Modifying parsed code

2006-07-07 Thread hadley wickham
I would like to take this: .img(plot(1:10), filename=a) and produce plot(1:10) Peter Dalgaard provided me with this: f - function(e) { if (!is.recursive(e)) e else if (e[[1]] == quote(.img)) e[[2]] else as.call(lapply(e, f)) } f(quote({a-1;.img(abc,123)})) { a - 1 abc } which

Re: [Rd] [R] Function hints

2006-06-20 Thread hadley wickham
I think it's bad to document dissimilar functions in the same file, but similar related functions *should* be documented together. Not doing this just adds to the burden of documenting them, and the risk of modifying only part of the documentation so that it is inconsistent. The user also gets

Re: [Rd] [R] Function hints

2006-06-20 Thread hadley wickham
For me, it's been extremely helpful to keep function documentation together during editing-- it greatly increases the chance that I will actually update the doco when I change the code, rather than putting it off until I've forgotten what I did. Also, writing Rd format is a nightmare (again,

Re: [Rd] Package naming best practices

2006-06-16 Thread hadley wickham
Hi Jeff, I'd recommend you name it something you can google easily (ie. that there are few (or no) hits currently from google). That way it's really easy to tell people how to find the package/your webpage. Hadley On 6/15/06, Jeff Enos [EMAIL PROTECTED] wrote: R-devel, I'm in the process of

[Rd] Making a windows packages with zip

2006-06-12 Thread hadley wickham
In the past I have been able to make windows packages (containing only R code) from my mac by simply zipping the installed package directory, eg. R CMD install asmrsim cd ~/Library/R/library/ zip -r9X asmrsim asmrsim (using code copied from this list, from Duncan Murdoch, I think) However,

Re: [Rd] Making a windows packages with zip

2006-06-12 Thread hadley wickham
Either the latter or ask the Windows users to install the source package. Installing a source package doesn't seem to help: install.packages(classifly, repos=http://ggobi.org/r/;, type=source) Warning message: installation of package 'classifly' had non-zero exit status in:

[Rd] Idempotent apply

2006-06-09 Thread hadley wickham
Dear all, I have been working on an idempotent version of apply, such that applying a function f(x) = x (ie. force) returns the same array (or a permutation of it depending on the order of the margins): a - array(1:27, c(2,3,4)) all.equal(a, iapply(a, 1, force)) all.equal(a, iapply(a, 1:2,

[Rd] Warning: use of NULL environment is deprecated (in R CMD check)

2006-05-10 Thread hadley wickham
* checking S3 generic/method consistency ... WARNING Warning: use of NULL environment is deprecated Warning: use of NULL environment is deprecated See section 'Generic functions and methods' of the 'Writing R Extensions' manual. I don't get any other warnings or errors. Can anyone suggest what

Re: [Rd] Warning: use of NULL environment is deprecated (in R CMD check)

2006-05-10 Thread hadley wickham
I don't get any other warnings or errors. Can anyone suggest what the problem might be? (R2.3.0, OS X) For reference: the problem was caused by having dependent packages that been installed prior to R 2.3.0. Hadley __ R-devel@r-project.org mailing

Re: [Rd] Seg fault when installing package from bad repository

2006-05-09 Thread hadley wickham
It still segfaults even now that I've fixed the access error. Ah, but if I specify type=source, so it must be a problem with having a mac binary path but no packages in it. Is there anyway to fall back to source automatically? Thanks, Hadley On 5/9/06, hadley wickham [EMAIL PROTECTED] wrote

[Rd] Patch for r-intro to update xgobi to ggobi

2006-05-08 Thread hadley wickham
Patch attached. If this is acceptable, would someone please be able to check this in for me? Thanks, Hadley __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Should demo files be run as part of R CMD check?

2006-04-10 Thread hadley wickham
The rationale may be that a demo is entitled to assume it is being run interactively. Checking demo(tkdensity), for example, would be unproductive. Also, it is easy for a package author to arrange to check the demos by a test in the package's tests directory. Thanks for your comments -

[Rd] Should demo files be run as part of R CMD check?

2006-04-07 Thread hadley wickham
I was a bit suprised to note that demo files are not run as part of R CMD check. This seems out of keeping with the philosophy of running all code contained in the package (in the source, in examples etc). Should demo files be checked as part of R CMD check? Hadley

[Rd] Package dependencies when submitting to CRAN: policies?

2006-03-19 Thread hadley wickham
What is the policy for submitting packages that depend on external non-R code? We'd like to add Rggobi2 to CRAN, but since the CRAN machine won't have GGobi, I wanted to check what the policy/procedures are. Regards, Hadley __ R-devel@r-project.org

Re: [Rd] Links to non-vignette documentation

2006-02-24 Thread hadley wickham
No, there's no automatic building after the promptPackage call. It's up to you to decide which functions need to be mentioned to users. In large packages it usually doesn't make sense to list all the functions, so the package writer needs to use judgement here. There are other mechanisms

[Rd] Links to non-vignette documentation

2006-02-23 Thread hadley wickham
Section 1.4 of Writing R Extensions says: In addition to the help files in Rd format, R packages allow the inclusion of documents in arbitrary other formats. The standard location for these is subdirectory inst/doc of a source package, the contents will be copied to subdirectory doc when the

Re: [Rd] Links to non-vignette documentation

2006-02-23 Thread hadley wickham
Is there anyway to have my pdf documentation listed under vignettes other than making it a sweave file? No, a vignette is regarded as an Sweave file. It would be useful if there was a mechanism to allow arbitrary pdf files to be included as vignettes. There are many other ways to include R

Re: [Rd] Links to non-vignette documentation

2006-02-23 Thread hadley wickham
I think you need to define `vignette'. I understand the usage to mean an Sweave file. There are ways to include other PDF files, and you can write your own index file. R can't do that for you as it cannot read PDF (it can read Sweave). How can I write an index file with a pointer to my

Re: [Rd] Links to non-vignette documentation

2006-02-23 Thread hadley wickham
We were referring to an HTML index file. If you want to have a reference from your package man page (foo-package.Rd) or some other man page, you can use \url{../doc/my.pdf} and the link will work in HTML versions of help, and won't be too misleading in other versions (especially if you

Re: [Rd] Computing means, variances and sums

2006-02-19 Thread hadley wickham
p.s. If my computations are correct, 0.2 = 0*/2 + 0/4 + 1/8 + 1/16 + 0/32 + 0/64 + 1/128 + 1/256 + 0/512 + 0/1024 + 1/2048 + 1/4096 + ... = 0.3h. Perhaps someone can extend this to an FAQ to help explain finite precision arithmetic and rounding issues. This is drifting a bit off

[Rd] Retrieving an unevaluated argument

2006-02-01 Thread hadley wickham
I'm trying to retrieve an unevalated argument (a list in particular). I can do this easily when I call the function directly: a1 - function(x) match.call()$x a1(list(y=x^2)) list(y = x^2) But when the function is called by another function, it gets trickier b - function(x, f) f(x)

[Rd] Converting an unevaluted list to list of unevaluted elements

2006-02-01 Thread hadley wickham
Thanks to Andy Liaw, I have realised my problem isn't getting an unevaluated argument, my problem really is converting an unevaluted list to list of unevaluted elements. That is, how can I go from substitute(list(a=x, b=c)) to list(a=substitute(x), b=substitute(c)) (I am also interested in a

Re: [Rd] cairo anyone?

2005-12-23 Thread hadley wickham
| Michael Lawrence has as part of RGtk2. Speaking of which -- I tried to find his code anywhere on the Internets following his very nice DSC presentation, but no beans. Why is this in hiding? Is it expected to surface at some point? Any insights, Duncan? Michael is currently working on

Re: [Rd] Brainstorm: Alpha and Beta testing of R versions

2005-11-07 Thread hadley wickham
actually, it might not be a bad idea to require a unique bug-entry interface -- actually we have been thinking of moving to bugzilla -- if only Peter Dalgaard could find a smart enough person (even to be paid) who'd port all the old bug reports into the new format.. If you haven't already it

Re: [Rd] Problems with example(Grid) in grid package

2005-10-21 Thread hadley wickham
I've also noticed the behaviour of grid.rect() has changed in 2.2.0. Before the fill defaulted to transparent, but now it defaults to white. Hadley On 10/21/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: The following: library(grid) grid.newpage() example(Grid) has the yaxis label

Re: [Rd] by() processing on a dataframe

2005-09-30 Thread hadley wickham
I'm not entirely sure what you want, but maybe this does the trick? data.frame.by - function(data, variables, fun, ...) { if (length(variables) == 0 ) { df - data.frame(results = 0) df$results - list(fun(data$value, ...)) return(df)

Re: [Rd] Functions with the same name: best practices

2005-08-26 Thread hadley wickham
Thanks to all of you for your advice. I will read up on namespaces and start using them to protect my internal function from name clashes with other packages, and endeavour to my public functions unique names. I know other languages (eg. python) separate loading a package and including it in the

<    3   4   5   6   7   8