weeklyDevotedDays: Metrics identifying the breadth and proportion of taxa...

Description Usage Arguments Value Examples

View source: R/weeklyDevotedDays.R

Description

These metrics describe frequency of recording in weeks in which the recorder made observations.

Usage

1
2
3
4
5
6
weeklyDevotedDays(
  recorder_name,
  data,
  recorder_col = "recorders",
  date_col = "date_start"
)

Arguments

recorder_name

the name of the recorder for whom you want to calculate the metrics

data

the data.frame of recording information

recorder_col

the name of the column that contains the recorder names

date_col

the name of the column that contains the date. This must be formatted as a date

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 

# load example data
head(cit_sci_data)


WDD <- weeklyDevotedDays(recorder_name = 3007,
                         data = cit_sci_data,
                         recorder_col = 'recorder',
                         date_col = 'date')

head(WDD)

# Run for more than one recorder, this can be slow 
WDD_all <- lapply(unique(cit_sci_data$recorder),
                  FUN = weeklyDevotedDays, 
                  data = cit_sci_data,
                  recorder_col = 'recorder',
                  date_col = 'date')

# summarise as one table
WDD_all_sum <- do.call(rbind, WDD_all)

hist(WDD_all_sum$median_weekly_devoted_days)


## End(Not run) 

BiologicalRecordsCentre/recorderMetrics documentation built on Nov. 10, 2021, 2:03 p.m.