You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' @param id_column the column in both the `participants` and `contacts` data frames that links contacts to participants
13
-
#' @param country_column the column in the `participants` data frame containing the country in which the participant was queried; if NULL (default), will use "country" column if present
14
-
#' @param year_column the column in the `participants` data frame containing the year in which the participant was queried; if NULL (default), will use "year" column if present
13
+
#' @param id_column the column in both the `participants` and
14
+
#' `contacts` data frames that links contacts to participants
15
+
#' @param country_column the column in the `participants` data frame
16
+
#' containing the country in which the participant was queried; if
17
+
#' NULL (default), will use "country" column if present
18
+
#' @param year_column the column in the `participants` data frame
19
+
#' containing the year in which the participant was queried; if
20
+
#' NULL (default), will use "year" column if present
"{label} age column {.arg {age_column}} or columns to \\
32
+
estimate {tolower(label)} age ({.arg {exact_col}} or \\
33
+
{.arg {min_col}} and {.arg {max_col}}) do not exist in \\
34
+
the {tolower(label)} data frame.",
35
+
call=call
36
+
)
37
+
FALSE
38
+
}
39
+
1
40
#' @export
2
41
check<-function(x, ...) UseMethod("check")
3
42
#' @name check
4
43
#' @rdname check
5
44
#' @title Check contact survey data
6
45
#'
7
-
#' @description Checks that a survey fulfills all the requirements to work with the 'contact_matrix' function
46
+
#' @description Checks that a survey fulfills all the requirements
47
+
#' to work with the 'contact_matrix' function
8
48
#'
9
49
#' @param x A [survey()] object
10
-
#' @param id.column the column in both the `participants` and `contacts` data frames that links contacts to participants
11
-
#' @param participant.age.column the column in the `participants` data frame containing participants' age; if this does not exist, at least columns "..._exact", "..._est_min" and "..._est_max" must (see the `estimated.participant.age` option in [contact_matrix()])
12
-
#' @param country.column the column in the `participants` data frame containing the country in which the participant was queried
13
-
#' @param year.column the column in the `participants` data frame containing the year in which the participant was queried
14
-
#' @param contact.age.column the column in the `contacts` data frame containing the age of contacts; if this does not exist, at least columns "..._exact", "..._est_min" and "..._est_max" must (see the `estimated.contact.age` option in [contact_matrix()])
50
+
#' @param id.column the column in both the `participants` and
51
+
#' `contacts` data frames that links contacts to participants
52
+
#' @param participant.age.column the column in the `participants`
53
+
#' data frame containing participants' age; if this does not
54
+
#' exist, at least columns "..._exact", "..._est_min" and
55
+
#' "..._est_max" must exist (see the
56
+
#' `estimated.participant.age` option in [contact_matrix()])
57
+
#' @param country.column the column in the `participants` data
58
+
#' frame containing the country in which the participant was
59
+
#' queried
60
+
#' @param year.column the column in the `participants` data frame
61
+
#' containing the year in which the participant was queried
62
+
#' @param contact.age.column the column in the `contacts` data
63
+
#' frame containing the age of contacts; if this does not exist,
64
+
#' at least columns "..._exact", "..._est_min" and
65
+
#' "..._est_max" must exist (see the
66
+
#' `estimated.contact.age` option in [contact_matrix()])
15
67
#' @param ... ignored
16
68
#' @return invisibly returns a character vector of the relevant columns
0 commit comments