[R] What is best way to calculate % of time?

John Kane jrkr|de@u @end|ng |rom gm@||@com
Wed Dec 25 16:15:59 CET 2019


I am sorry but I am at a loss here.
According to your sample data you have 3 Species : Buzz,  Ptedav,
Ptemes, but you say that "Buzz" indicates that the bat is feeding.
What has that to do with feeding?

Assuming Buzz is feeding activity, are all incidents of feeding
activity a single point in time?

Likewise the data has multiple entries such as
Ptedav    7717    7/3/2000    20:15
Ptedav    7717    7/3/2000    20:15
Ptedav    7717    7/3/2000    20:15
Ptedav    7717    7/3/2000    20:15

What does that represent?


On Wed, 25 Dec 2019 at 07:29, Neotropical bat risk assessments
<neotropical.bats using gmail.com> wrote:
>
> Hi all,
>
> It seems R has gotten better/more packages in dealing with time data.
>
> I want to create "simple" summaries of time for bat activity.
> Data is all in an Access relational database and exported as a CSV file
> with 4 columns in this format:
> Species = a 6 letter code or "Buzz" to indicated when bats are feeding
> Location = a 4 digit number
> Date= MMDDYYYY
> Time=HH:MM (24 hr format)
>
> Species    Location    Date    Time
> Buzz    7716    1/25/2000    0:05
> Buzz    7716    1/25/2000    0:05
> Buzz    7716    1/25/2000    0:05
> Buzz    7716    1/25/2000    0:47
> Buzz    7716    1/25/2000    0:47
> Buzz    7716    1/25/2000    0:47
> Buzz    7716    1/25/2000    0:47
> Buzz    7717    7/3/2000    20:17
> Buzz    7717    7/3/2000    20:17
> Buzz    7717    7/3/2000    20:17
> Buzz    7717    7/3/2000    20:17
> Buzz    7717    7/3/2000    20:30
> Buzz    7717    7/3/2000    20:30
> Buzz    7717    7/3/2000    20:30
> Buzz    7717    7/3/2000    20:30
> Ptedav    7717    7/3/2000    20:14
> Ptedav    7717    7/3/2000    20:15
> Ptedav    7717    7/3/2000    20:15
> Ptedav    7717    7/3/2000    20:15
> Ptedav    7717    7/3/2000    20:15
> Ptedav    7717    7/3/2000    20:15
> Ptedav    7717    7/3/2000    20:17
> Ptedav    7717    7/3/2000    20:17
> Ptedav    7717    7/3/2000    20:17
> Ptedav    7717    7/3/2000    20:18
> Ptedav    7717    7/3/2000    20:18
> Ptedav    7717    7/3/2000    20:18
> Ptedav    7717    7/3/2000    20:18
> Ptedav    7717    7/3/2000    20:18
> Ptemes    7717    7/3/2000    23:15
> Ptemes    7717    7/3/2000    23:21
> Ptemes    7717    7/3/2000    23:22
> Ptemes    7717    7/3/2000    23:23
> Ptemes    7717    7/3/2000    23:25
> Ptemes    7717    7/3/2000    23:26
> Ptemes    7717    7/3/2000    23:27
> Ptemes    7717    7/3/2000    23:28
> Ptemes    7717    7/3/2000    23:29
> Ptemes    7717    7/3/2000    23:33
> Ptemes    7717    7/3/2000    23:35
> Ptemes    7717    7/3/2000    23:36
> Ptemes    7717    7/3/2000    23:37
>
> The above is clearly not a complete DF but only a format sample. Data
> begins when the first bat was recorded and ends when the last bat was
> recorded.  So all are times from sunset to sunrise.  Dates roll over so
> for example one night of data would begin at 18:00 1/1/2000 and end
> 06:00 1/2/2000.
>
> What I need to do is have a summary of Buzz events (feeding) and
> calculate the percentage of total time bats were active and have a
> summary of time feeding buzz was recorded and total bat activity to
> determine what percentage of time was spent with feeding attempts over
> the active period.
>
> This by all bats by survey night and by single species by survey night.
> Any suggestions welcomed.
>
> Happy holidays all
>
>
> --
> Bruce W. Miller, PhD.
> Neotropical bat risk assessments
> Conservation Fellow - Wildlife Conservation Society
>
> If we lose the bats, we may lose much of the tropical vegetation and the lungs of the planet
>
> Using acoustic sampling to identify and map species distributions
> and pioneering acoustic tools for ecology and conservation of bats for >25 years.
>
> Key projects include providing free interactive identification keys and call fact sheets for the vocal signatures of New World Bats
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.



--
John Kane
Kingston ON Canada



More information about the R-help mailing list