Re: [R] Condition warning: has length > 1 and only the first element will be used

2008-10-15 Thread Joe Kaser
r > Intermountain Healthcare > [EMAIL PROTECTED] > 801.408.8111 > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > project.org] On Behalf Of Joe Kaser > > Sent: Wednesday, October 15, 2008 2:19 PM > > To: r-help@r-project.o

Re: [R] Condition warning: has length > 1 and only the first element will be used

2008-10-15 Thread Joe Kaser
Thanks for the help. ifelse does the job. Could you elaborate, or give an example of the "awkward" things ifelse might do to classed objects? On Wed, Oct 15, 2008 at 1:38 PM, Peter Dalgaard <[EMAIL PROTECTED]>wrote: > Joe Kaser wrote: > >> Hello, >> >> I&#

[R] Condition warning: has length > 1 and only the first element will be used

2008-10-15 Thread Joe Kaser
Hello, I've been learning R functions recently and I've come across a problem that perhaps someone could help me with. # I have a a chron() object of times > hours=chron(time=c("01:00:00","18:00:00","13:00:00","10:00:00")) # I would like to subtract 12 hours from each time element, so I created

Re: [R] Ragged time series data

2008-10-04 Thread Joe Kaser
tes and times in R News 4/1 > and note the chron class which, in fact, accepts inputs in the > very form you have. > > On Fri, Oct 3, 2008 at 7:39 PM, Joe Kaser <[EMAIL PROTECTED]> wrote: > > Hi and thanks in advance, > > > > I am fairly new with R so I hope this

[R] Ragged time series data

2008-10-03 Thread Joe Kaser
Hi and thanks in advance, I am fairly new with R so I hope this problem isn't too amateur. I have a vector of count data which correspond to vectors of date (%m/%d/%Y) and time of day (%H:%M:%S). I am trying to compute various statistics (e.g. daily max) by lumping the data together by day. I h