Re: [Rd] Package Directory Hierarchy: Recursive inclusion of *.R possible?

2010-02-04 Thread Barry Rowlingson
On Wed, Feb 3, 2010 at 10:40 AM, Johannes Graumann johannes_graum...@web.de wrote: Hello, I would like to organize the R directory in my home-grown package into sub-directories, but R CMD --build doesn't seem to find *.R files below the actual source directory. Is there any way around that?

[Rd] Why is there no c.factor?

2010-02-04 Thread Hadley Wickham
Hi all, Is there are reason that there is no c.factor method? Analogous to c.Date, I'd expect something like the following to be useful: c.factor - function(...) { factors - list(...) levels - unique(unlist(lapply(factors, levels))) char - unlist(lapply(factors, as.character))

Re: [Rd] Package Directory Hierarchy: Recursive inclusion of *.R possible?

2010-02-04 Thread Thomas Lumley
On Thu, 4 Feb 2010, Barry Rowlingson wrote: On Wed, Feb 3, 2010 at 10:40 AM, Johannes Graumann johannes_graum...@web.de wrote: Hello, I would like to organize the R directory in my home-grown package into sub-directories, but R CMD --build doesn't seem to find *.R files below the actual

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread Thomas Lumley
On Thu, 4 Feb 2010, Hadley Wickham wrote: Hi all, Is there are reason that there is no c.factor method? Analogous to c.Date, I'd expect something like the following to be useful: c.factor - function(...) { factors - list(...) levels - unique(unlist(lapply(factors, levels))) char -

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread John Fox
Dear Thomas and Hadley, I'd propose the following: If the sets of levels of all arguments are the same, then c.factor() would return a factor with the common set of levels; if the sets of levels differ, then, as Hadley suggests, the level-set of the result would be the union of sets of levels of

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread Patrick Burns
The argument I have in 'The R Inferno' is that how you want to combine factors may differ from someone else's desires. There are lots of tricky questions: What about ordered factors? What if the ordered levels are different in different objects? ... Pat On 04/02/2010 15:53, Hadley Wickham

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread Hadley Wickham
I'd propose the following: If the sets of levels of all arguments are the same, then c.factor() would return a factor with the common set of levels; if the sets of levels differ, then, as Hadley suggests, the level-set of the result would be the union of sets of levels of the arguments, but a

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread hadley wickham
On Thu, Feb 4, 2010 at 10:45 AM, Patrick Burns pbu...@pburns.seanet.com wrote: The argument I have in 'The R Inferno' is that how you want to combine factors may differ from someone else's desires. There are lots of tricky questions: What about ordered factors? What if the ordered levels

Re: [Rd] Why is there no c.factor?

2010-02-04 Thread Matthew Dowle
A search for c.factor returns tons of hits on this topic. Heres just one of the hits from 2006, when I asked the same question : http://tolstoy.newcastle.edu.au/R/e2/devel/06/11/1137.html So it appears to be complicated and there are good reasons. Since I needed it, I created c.factor in

Re: [Rd] Error with cut.POSIXt and daylight savings time switchover dates (patch included)

2010-02-04 Thread Brian Diggs
On 2/3/2010 7:48 AM, Brian Diggs wrote: On 2/1/2010 3:57 PM, Brian Diggs wrote: The following code: cut(as.POSIXct(2009-11-01 04:00:00, tz=America/Los_Angeles), 1 day) gives the error: Error in seq.int(0, to - from, by) : 'to' must be finite [details deleted...] Is there a