View source: R/countRegional.R
countRegional | R Documentation |
Function to create tsibble object for a count of 'unit' per 'datename' e.g. countRegional(oc, Locality, datename, Quantity) is the 'Quantity' per 'datename' grouped by 'Locality' from 'oc'. 'Quantity' is corrected for the number of days in each month.
countRegional(data, region, datename = datename, unit = Quantity)
data |
A dataframe with date and unit of medicines |
region |
Column name of regional unit of interest (e.g., 'practiceid', 'gp_cluster') |
datename |
Name of the column containing the date data |
unit |
Unit of interest (e.g., 'quantity', 'items') |
Dataframe of units prescribed grouped by date and regional unit
## Not run: countRegional(data, region = practiceid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.