Description Usage Arguments Value Examples
View source: R/weeklyDevotedDays.R
These metrics describe frequency of recording in weeks in which the recorder made observations.
1 2 3 4 5 6 | weeklyDevotedDays(
recorder_name,
data,
recorder_col = "recorders",
date_col = "date_start"
)
|
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 |
recorder
- The name of the recorder, as given in the recorder_name argument
median_weekly_devoted_days
- The median number of days this person recorders in a weeks where they make at least one observation
n_weeks
- The total number of weeks in which this recorder has made at least one observation
n_days
- The total number of days on which this recorder has made observations
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.