merge_data | R Documentation |
Clean and merge flusurvey data tables
merge_data(
data,
clean = c("remove.first", "remove.bad.symptom.dates", "remove.bad.health.score",
"limit.season", "remove.postcodes", "n.reports", "unsuccessful.join",
"only.symptoms"),
min.reports = 3,
ranges = "sample",
age.breaks = c(18, 45, 65)
)
data |
the data to merge and clean, usually the result of |
clean |
cleaning options, NULL for no cleaning, otherwise a vector of cleans to perform (by default all):
- 'remove.first', whether to remove everyone's first report,
- 'remove.bad.symptom.dates', whether to remove bad symptom dates: symptom start before date of first or end after end of last report, end of symptoms before start of symptoms, symptoms reported to have started or ended after date of report
- 'remove.bad.health.scores', whether to remove health scores <0 or >100
- 'limit.season', whether to limit a flu season to November -> April
- 'remove.postcodes', whether to remove postcodes
- 'n.reports', whether to exclude those with fewer than |
min.reports |
minimum number of reports per user (ignored if 'min.reports' is not given as a cleaning option) |
ranges |
what to do if a number of contacts is given as a range: sample from the range ("sample"), or apply a function, given as character string (e.g., "mean") |
age.breaks |
a vector of limits of age groups (first age group starts at 0 years of age) |
a rolling-joined data table
seb
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.