Neotropical bat risk assessments
2009-Jan-14 13:26 UTC
[R] Zoo for plotting time and dates
Hi all, For some reason the messages keep getting rejected. trying again... As I understand the zoo package will aggregate dates and times, but unclear how to tackle this problem. I need to accomplish the following: 1. Generate a scatter plot of bat activity with dates on the X-axis and time on the Y-axis. include sunset and sunrise curves as an added part of graphic. In Excel I have a kludged way to do this, but it is not exactly what I need and the times on the Y axis do not display correctly due to the 24:00 roll over to next date and would prefer to understand how to do this using R so I can repeat it with multiple data sets for multiple locations. I removed the Graphic display as apparently the server refused the massage with it. I can email directly if anyone is able to assist or wished to see it. A sample of the data format is below. Any suggestion welcome. Tnx. The bat activity data is in the format below with the species name, date and time the species was active. Spec_code Date Time Eptfus 6/4/03 22:44 Eptfus 6/4/03 22:44 Eptfus 6/9/03 21:59 Eptfus 6/10/03 3:24 Eptfus 6/13/03 0:22 Eptfus 6/13/03 3:24 Eptfus 6/17/03 0:03 Eptfus 6/17/03 2:43 Eptfus 6/17/03 21:59 The sunset-Sunrise data seen below is also straight forward: Date Rise Set 6/1/2003 4:12 19:50 6/2/2003 4:11 19:51 6/3/2003 4:10 19:52 6/4/2003 4:10 19:53 6/5/2003 4:09 19:54 6/6/2003 4:09 19:54 6/7/2003 4:09 19:55 6/8/2003 4:08 19:56 6/9/2003 4:08 19:57 6/10/2003 4:08 19:57 6/11/2003 4:07 19:58 6/12/2003 4:07 19:58 6/13/2003 4:07 19:59 6/14/2003 4:07 19:59 6/15/2003 4:07 20:00 6/16/2003 4:07 20:00 6/17/2003 4:07 20:01 6/18/2003 4:07 20:01
This was already answered here: https://stat.ethz.ch/pipermail/r-help/2009-January/184839.html On Wed, Jan 14, 2009 at 8:26 AM, Neotropical bat risk assessments <neotropical.bats at gmail.com> wrote:> Hi all, > > For some reason the messages keep getting rejected. > trying again... > > > As I understand the zoo package will aggregate dates and times, but unclear > how to tackle this problem. > > I need to accomplish the following: > > 1. Generate a scatter plot of bat activity with dates on the X-axis and time > on the Y-axis. > include sunset and sunrise curves as an added part of graphic. > > In Excel I have a kludged way to do this, but it is not exactly what I need > and the times on the Y axis do not display correctly due to the 24:00 roll > over to next date and would prefer to understand how to do this using R so I > can repeat it with multiple data sets for multiple locations. > I removed the Graphic display as apparently the server refused the massage > with it. > I can email directly if anyone is able to assist or wished to see it. > > A sample of the data format is below. > Any suggestion welcome. > > Tnx. > > The bat activity data is in the format below with the species name, date and > time the species was active. > > Spec_code Date Time > Eptfus 6/4/03 22:44 > Eptfus 6/4/03 22:44 > Eptfus 6/9/03 21:59 > Eptfus 6/10/03 3:24 > Eptfus 6/13/03 0:22 > Eptfus 6/13/03 3:24 > Eptfus 6/17/03 0:03 > Eptfus 6/17/03 2:43 > Eptfus 6/17/03 21:59 > > > > The sunset-Sunrise data seen below is also straight forward: > Date Rise Set > 6/1/2003 4:12 19:50 > 6/2/2003 4:11 19:51 > 6/3/2003 4:10 19:52 > 6/4/2003 4:10 19:53 > 6/5/2003 4:09 19:54 > 6/6/2003 4:09 19:54 > 6/7/2003 4:09 19:55 > 6/8/2003 4:08 19:56 > 6/9/2003 4:08 19:57 > 6/10/2003 4:08 19:57 > 6/11/2003 4:07 19:58 > 6/12/2003 4:07 19:58 > 6/13/2003 4:07 19:59 > 6/14/2003 4:07 19:59 > 6/15/2003 4:07 20:00 > 6/16/2003 4:07 20:00 > 6/17/2003 4:07 20:01 > 6/18/2003 4:07 20:01 > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >