View source: R/find_latest_events.R
find_latest | R Documentation |
Find the latest A360 event for follow up from a list of service provision reports stored in a google spreadsheet.
find_latest(events, from = NULL, ...) find_latest_by_name_and_id(events) find_latest_by_name(events) find_latest_by_phone_number(events)
events |
A data frame with events to find. |
from |
A google spreadsheet ID, where to search the events from. |
... |
Additional params passed to the read_sheet. |
The latest event is determined using the girl ID
, name of girl
,
and phone number
for girls with a single report and date of service provision
for girls with multiple reports.
In cases where there are multiple reports for the same girl, but the newest is missing the phone number, the newest record is updated with any available phone number in the reports:
record 1 phone number : NA
record 2 phone number : XXX XXX XXXX
record 3 phone number : NA
the newest record will be assigned the phone number : XXX XXX XXXX
this is similar to cases where there different phone numbers:
record 1 phone number : NA
record 2 phone number : XXX XXX XXXX
record 3 phone number : YYY XXX YYYY
the newest record will be assigned both available phone numbers : XXX XXX XXXX | YYY XXX YYYY
the phone number is validated; only records with a phone number equal to or
more than 10 digits
are returned.
A data.table object with the latest unique events for follow up.
find_latest
: Find the latest event for follow up
find_latest_by_name_and_id
: Find the latest event by girl id and name
find_latest_by_name
: Find latest the event by name
find_latest_by_phone_number
: Find the latest event by phone number
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.