[R] Trying to perform an inner loop a random number of times

2011-04-27 Thread Galen Moore
Grateful for any hints as to why I'm not getting the inner loop to cycle the expected number of times. Code and one run's results below. Thanks, Galen > # source("looptest.r") > sp<-numeric() > iter<-numeric() > rn<-numeric() > ds<-data.frame(sp, iter, rn) > > for (sp in

Re: [R] Trying to perform an inner loop a random number of times

2011-04-28 Thread Galen Moore
loop and this let me see what was going on. You need to learn to instrument your scripts so that you can trace the progress and see if it is working correctly. On Wed, Apr 27, 2011 at 10:33 PM, Galen Moore wrote: > Grateful for any hints as to why I'm not getting the inner loop to > cy

[R] DateTime Math in R - POSIXct

2011-05-30 Thread Galen Moore
e="MDT") > mode(dateP) [1] "numeric" > dateP [1] "2011-05-22 11:45:00 MDT" > > dateN <- as.numeric(dateP) > dateN [1] 1306086300 > > dateP2 <- as.POSIXct(dateN, origin="1970-01-01", tzone=

Re: [R] DateTime Math in R - POSIXct

2011-05-30 Thread Galen Moore
ric: "origin:a date-time object, or something which can be coerced by as.POSIXct(tz="GMT") to such an object." Note the coercion. Bill Venables. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Galen Moore Se

Re: [R] DateTime Math in R - POSIXct

2011-05-30 Thread Galen Moore
:31 To: galen.a.mo...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] DateTime Math in R - POSIXct On May 30, 2011, at 10:20 PM, Galen Moore wrote: > Greetings - > > > > I'm battling POSIXct, as per the code below. My input is actually an > XL file, but the weird re

Re: [R] DateTime Math in R - POSIXct

2011-05-31 Thread Galen Moore
dered. --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k ---

[R] Adding a line to a beside=TRUE barplot

2011-06-02 Thread Galen Moore
Greetings – Grateful for any help on this one: In the following demo code, I am trying to get the points in the line to appear over the same x-axis labels as are used by the paired Bars. It appears, however, that R/lattice ignores the x-axis points used by the bars and plots the x points

Re: [R] Adding a line to a beside=TRUE barplot

2011-06-03 Thread Galen Moore
done with barchart i/o barplot. Galen -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Friday, June 03, 2011 02:45 To: galen.a.mo...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] Adding a line to a beside=TRUE barplot On 2011-06-02 13:09, Galen Moore wrote: &

[R] Custom Sort on a Table object

2011-06-06 Thread Galen Moore
Greetings - I've got the following table (the result of a two-way table operation): f m 0 to 5 11.328000 6.900901 15 to 24 6.100570 5.190058 25 to 34 9.428707 6.567280 35 to 4410.462158 7.513270 45 to 54 7.621988 5.6929

[R] Trouble Passing a for loop variable (iteration #) to a data frame

2011-04-25 Thread Galen Moore
Greetings - I am working on a piece of code to simulate vehicle times in and out in each of a number of parking spaces. At this stage, my code basically does what it is supposed to do but for the sequential number of each new parking event for a given space (i.e., the index of the loop variab

Re: [R] Trouble Passing a for loop variable (iteration #) to a data frame

2011-04-25 Thread Galen Moore
t x[i], and the last x[i] at the end of each loop is 4. Peter On Mon, Apr 25, 2011 at 3:29 PM, Galen Moore wrote: > Greetings - > > > > I am working on a piece of code to simulate vehicle times in and out > in each of a number of parking spaces.  At this stage, my code > b