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

John Kane jrkr|de@u @end|ng |rom gm@||@com
Thu Dec 26 00:50:36 CET 2019


 LyX Document
Hi Bruce,
<b> Combining date and times does not provide for sampling nights that roll
over after midnight. </b>
Ah yesss legacies
<b>The location, date and time does provide unique variables.</b>
Ah, i thought so
<b>Rounding to nearest minute suffices for a summary of total minutes spent
with "feeding attempts" vs total active time.</b>
Okay, that removes my worry about durations. We can just treat each entry
as one elapsed minute?
however I still do not grasp the duplicated issue. we have in my dataframe:
Species Location dtime
Ptedav 7717 2000-07-03 20:15:00
Ptedav 7717 2000-07-03 20:15:00
Ptedav 7717 2000-07-03 20:15:00
Ptedav 7717 2000-07-03 20:15:00
Ptedav 7717 2000-07-03 20:15:00
I assume that this represents 5 separate recording but that they can be
collapsed into one 1-minute data point?  If so then would not all you need
to do is run a simple table() command? To handle the Buzz one mould produce
the Buzz data.frame and merge it with the new species data.frame?
I must be missing something. It looks too simple.



On Wed, 25 Dec 2019 at 18:11, Neotropical bat risk assessments <
neotropical.bats using gmail.com> wrote:

> Hi Bert,
>
> Tnx for taking time to reply.
> For clarification... the data do EXPLICITLY indicate when each species
> is active and when a feeding buzz is recorded.
> That is ALL it provides based on acoustic data recorded in the field.
> Only when a species is recorded  is it identified as active.
> How this is accomplished is of no importance to the question I asked.
>
> Note this is Not "individuals" per se. but species as a group.
>
> I appreciate you taking time to reply.
> Clearly this is not a simple solution to what I assumed to be a simple
> question.
> Restated as...
> *How best to use R to calculate occurrence of event( (A) over time vs
> all events (b...n) over the same time period give the data frame work I
> have.*
>
> Cheers,
> Bruce
>
>
> > I will not get into your explanation of details that, like John, I
> > find opaque. Please DO read Hadley's manifesto, as it appears that you
> > need to organize your data more appropriately.
> >
> > AFAICS, however, strictly speaking your data cannot answer the
> > question you have posed. **Strictly speaking** to know the proportion
> > of active time bats spend feeding, **for each bat** you would need to
> > know when it is active and when it is feeding during that time. You
> > could then summarize this for all bats (e.g. take the average or
> > median proportion) in a species or whatever. As you cannot identify
> > individual bats in your data, you cannot do this -- i.e. you cannot
> > answer your question.
> >
> > So the question then becomes: precisely **how** exactly do you propose
> > using the data you have to determine when a *group* of bats are active
> > and when they are feeding? How are the groups explicitly identified
> > and how are their times active and feeding determined? In short, you
> > need to have information that is something like:
> >
> > Bat.Group date   active.time.start  active.time.end
> > feeding.time.start feeding.time.end
> >
> > ( for a given date and bat group, there may be many multiple entries;
> > perhaps for a given group, date, and active time start and end,
> > several feeding time start/stop entries ( I have no idea how bats
> > behave)).
> >
> > Until you can expicitly explain how your data can generate such
> > information, I think it will be difficult/impossible to help you.
> >
> > Cheers,
> > Bert
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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

	[[alternative HTML version deleted]]



More information about the R-help mailing list