Re: [Rd] How to organized code in the R/ directory of a package?

2009-12-10 Thread David Scott
Tobias Verbeke wrote: Peng Yu wrote: I'm making a package, Current, I put all R files in the R/ directory in the package (without using subdirectory). This will become a problem when there are many files in the directory. I'm wondering how to use subdirectories in R/? The standard solution is

Re: [Rd] How to organized code in the R/ directory of a package?

2009-12-10 Thread hadley wickham
> I don't see ggplot in a tar.gz file on your website. It is also > removed from cran. Would you please let me know where I can download > the source code to take a look? It's ggplot2, not ggplot. > What 'appropriate tool support' do you refer to? Your text editor should make it easy to switch t

Re: [Rd] Which packages in R use C++?

2009-12-10 Thread cstrato
Have a look at: http://www.bioconductor.org/packages/release/bioc/html/xps.html It is almost completely C++ Regards Christian _._._._._._._._._._._._._._._._._._ C.h.r.i.s.t.i.a.n S.t.r.a.t.o.w.a V.i.e.n.n.a A.u.s.t.r.i.a e.m.a.i.l:cstrato at aon.at _._._._._._._._._._._._._._

Re: [Rd] How to organized code in the R/ directory of a package?

2009-12-10 Thread Peng Yu
I don't have many files yet. I'm just wondering what the convention of organizing files is, as different programming languages have different ways of organizing source code. I don't want to start in a wrong way and later to correct it. I don't see ggplot in a tar.gz file on your website. It is als

Re: [Rd] How to organized code in the R/ directory of a package?

2009-12-10 Thread hadley wickham
I have 145 R files in ggplot2, but don't have any problems navigating them (with appropriate tool support). Just how many files do you have? Hadley On Thu, Dec 10, 2009 at 3:56 PM, Peng Yu wrote: > I'm making a package, Current, I put all R files in the R/ directory > in the package (without u

Re: [Rd] How to organized code in the R/ directory of a package?

2009-12-10 Thread Tobias Verbeke
Peng Yu wrote: I'm making a package, Current, I put all R files in the R/ directory in the package (without using subdirectory). This will become a problem when there are many files in the directory. I'm wondering how to use subdirectories in R/? The standard solution is (I would think) to orga

[Rd] How to organized code in the R/ directory of a package?

2009-12-10 Thread Peng Yu
I'm making a package, Current, I put all R files in the R/ directory in the package (without using subdirectory). This will become a problem when there are many files in the directory. I'm wondering how to use subdirectories in R/? Does 'R CMD INSTALL' install the files in the subdirectories autom

Re: [Rd] Which packages in R use C++?

2009-12-10 Thread Dirk Eddelbuettel
On 10 December 2009 at 15:02, Peng Yu wrote: | I want to see some working examples on how to call C++ programs from | R. Could somebody let me know which R packages mainly use C++ rather | than C or Fortran? I am not aware of anyone keeping aggregate statistics. If you would like a simple exam

[Rd] Which packages in R use C++?

2009-12-10 Thread Peng Yu
I want to see some working examples on how to call C++ programs from R. Could somebody let me know which R packages mainly use C++ rather than C or Fortran? __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Request to add section number to the bookmarks of R pdf documents

2009-12-10 Thread Peng Yu
It will be convenient to add section number to the bookmarks of R documents that are in pdf format. Could somebody take some time add the sections number? Writing R Extensions R Data Import/Export R Language Definition etc. __ R-devel@r-project.org mai

[Rd] Which version of findInterval is used?

2009-12-10 Thread Peng Yu
In an R session, I see the following, which means that findInterval is an R function. > findInterval function (x, vec, rightmost.closed = FALSE, all.inside = FALSE) { if (any(is.na(vec))) stop("'vec' contains NAs") if (is.unsorted(vec)) stop("'vec' must be sorted non-decrea

[Rd] Using predict on a model with NA as a level (PR#14127)

2009-12-10 Thread tomas . larsson
Full_Name: Tomas Larsson Version: 2.8.0 OS: Windows XP Submission from: (NULL) (167.24.24.150) There appears to be a problem with using predict on a data set when NA has been specified as a level in the model, see example below. > # generate some data > x<-matrix(,10,2) > x[,1]<-c(numeric(5),nu

[Rd] Antwort: Re: Antwort: Re: Crash with Unicode and sub (PR#14126)

2009-12-10 Thread g . russell
SSB0YWtlIHRoYXQgYmFjayBhbnl3YXkuIEkgaGF2ZSBub3cgbWFuYWdlZCB0byByZWxpYWJseSBj cmFzaCBSIDIuMTAuMCBhbmQgDQpSIHZlcnNpb24gMi4xMC4xIFJDICgyMDA5LTEyLTA2IHI1MDY4 NCkgb24gV2luZG93cyB3aXRob3V0IHVzaW5nIHRoZSBzdWIgDQpmdW5jdGlvbi4gVGhlIGZvbGxv d2luZyBjb2RlIGRvZXMgaXQ6DQotLSBjdXQgaGVyZSAtLQ0KIHUgPC0gaW50VG9VdGY4

[Rd] Antwort: Re: Antwort: Re: Crash with Unicode and sub (PR#14114)

2009-12-10 Thread g . russell
I take that back anyway. I have now managed to reliably crash R 2.10.0 and R version 2.10.1 RC (2009-12-06 r50684) on Windows without using the sub function. The following code does it: -- cut here -- u <- intToUtf8(c(rep(1e3,1e2),32,c(rep(1e3,1e2 v <- rep(u,1e2) w <- paste(substring(v,1,100

Re: [Rd] Recent TeX changes and R/package manuals

2009-12-10 Thread Peter Ruckdeschel
Dear Prof Ripley thanks (once again) for your alert [snip] > As far as I can tell, the following CRAN package manuals have been > affected: > > distrMod, RCurl, RGtk2, SparseM, VIM, bit, ggplot2, operators, > relations, spam, tensorA > > (and only distrMod fatally). > > Given the current

Re: [Rd] Antwort: Re: Crash with Unicode and sub (PR#14114)

2009-12-10 Thread Peter Dalgaard
g.russ...@eos-solutions.com wrote: > SSBkb24ndCBrbm93IGFib3V0IHRoZSB0ZWNobmljYWxpdGllcywgYnV0IFBldGVyIERhbGdhYXJk > IHNhaWQgdGhlIA0Kb2ZmZW5kaW5nIGNvZGUgYWxzbyBjYXVzZXMgUiB0byBjb21lIHRvIGEgc3Rv > cCB1c2luZyBTVVNFICsgV0lORS4gSXMgaXQgDQpwb3NzaWJsZSB0byBydW4gdGhhdCBsb3Qgb24g [...Argh!, Jitterbug must d

Re: [Rd] expression paste broken in r-devel?

2009-12-10 Thread Hiroyuki Kawakatsu
On Thu, Dec 10, 2009, Duncan Murdoch wrote: > On 10/12/2009 6:21 AM, Hiroyuki Kawakatsu wrote: >> >> Hi, >> >> The following expression() is silently ignored in r-devel (r50697): >> >> plot(1:10) >> text(5, 5, expression(paste("foo ", alpha))) >> >> Am I the only one having this problem? example(pl

Re: [Rd] Antwort: Re: Crash with Unicode and sub (PR#14114)

2009-12-10 Thread Prof Brian Ripley
On Thu, 10 Dec 2009, g.russ...@eos-solutions.com wrote: I don't know about the technicalities, but Peter Dalgaard said the offending code also causes R to come to a stop using SUSE + WINE. Is it possible to run that lot on top of valgrind? Of course, it will probably take all day ... Yes, but

Re: [Rd] expression paste broken in r-devel?

2009-12-10 Thread Duncan Murdoch
On 10/12/2009 6:21 AM, Hiroyuki Kawakatsu wrote: Hi, The following expression() is silently ignored in r-devel (r50697): plot(1:10) text(5, 5, expression(paste("foo ", alpha))) Am I the only one having this problem? example(plotmath) runs but all constructs of the form expression(paste()) do n

[Rd] expression paste broken in r-devel?

2009-12-10 Thread Hiroyuki Kawakatsu
Hi, The following expression() is silently ignored in r-devel (r50697): plot(1:10) text(5, 5, expression(paste("foo ", alpha))) Am I the only one having this problem? example(plotmath) runs but all constructs of the form expression(paste()) do not show up in the plots. h. -- +--- | Hiroyuki Ka

Re: [Rd] switch() called with just the EXPR argument causes R to hang (PR#14124)

2009-12-10 Thread maechler
> "SG" == Simone Giannerini > on Thu, 10 Dec 2009 09:30:10 +0100 (CET) writes: SG> Dear all, switch() called with just the EXPR argument SG> causes R to hang so that the only way to stop it is to SG> kill R. SG> Reproducible example: >> switch(EXPR="a") SG>

[Rd] Antwort: Re: Crash with Unicode and sub (PR#14114)

2009-12-10 Thread g . russell
SSBkb24ndCBrbm93IGFib3V0IHRoZSB0ZWNobmljYWxpdGllcywgYnV0IFBldGVyIERhbGdhYXJk IHNhaWQgdGhlIA0Kb2ZmZW5kaW5nIGNvZGUgYWxzbyBjYXVzZXMgUiB0byBjb21lIHRvIGEgc3Rv cCB1c2luZyBTVVNFICsgV0lORS4gSXMgaXQgDQpwb3NzaWJsZSB0byBydW4gdGhhdCBsb3Qgb24g dG9wIG9mIHZhbGdyaW5kPyBPZiBjb3Vyc2UsIGl0IHdpbGwgcHJvYmFibHkgDQp0YWtl

[Rd] Antwort: Re: Crash with Unicode and sub (PR#14114)

2009-12-10 Thread g . russell
I don't know about the technicalities, but Peter Dalgaard said the offending code also causes R to come to a stop using SUSE + WINE. Is it possible to run that lot on top of valgrind? Of course, it will probably take all day ... If not, I have a clue which might help. The problem seems to lie

[Rd] R on Windows crashes when using certain characters in strings in data frames (PR#14125)

2009-12-10 Thread karl
Full_Name: Karl Ove Hufthammer Version: 2.10.0 OS: Windows XP Submission from: (NULL) (93.124.134.66) I have found a rather strange bug in R 2.10.0 on Windows, where the choice of characters used in a string make R crash (i.e., Windows shows a dialogue saying that the application has a problem, a

[Rd] switch() called with just the EXPR argument causes R to hang (PR#14124)

2009-12-10 Thread sgiannerini
Dear all, switch() called with just the EXPR argument causes R to hang so that the only way to stop it is to kill R. Reproducible example: > switch(EXPR="a") the internal C subroutine behind switch is do_switch located in R/src/main/builtin.c For convenience I reproduce it below. *

Re: [Rd] Recent TeX changes and R/package manuals

2009-12-10 Thread Prof Brian Ripley
I've managed to find a workaround for point (ii) in the Rd processing, so that will make 2.10.1. (In all cases the primary cause was an alias containing |, although in some cases that cascaded to a different LaTeX error.) On Wed, 9 Dec 2009, Prof Brian Ripley wrote: As some of you will be aw