27
27
# '
28
28
# ' @return
29
29
# ' An object of type \code{covariateSettings}, to be used in other functions.
30
+ # '
31
+ # ' @examples
32
+ # ' \dontrun{
33
+ # ' analysisDetails <- createAnalysisDetails(analysisId = 1,
34
+ # ' sqlFileName = "DemographicsGender.sql",
35
+ # ' parameters = list(analysisId = 1,
36
+ # ' analysisName = "Gender",
37
+ # ' domainId = "Demographics"),
38
+ # ' includedCovariateConceptIds = c(),
39
+ # ' addDescendantsToInclude = FALSE,
40
+ # ' excludedCovariateConceptIds = c(),
41
+ # ' addDescendantsToExclude = FALSE,
42
+ # ' includedCovariateIds = c())
43
+ # ' covSettings <- createDetailedCovariateSettings(analyses = analysisDetails)
44
+ # ' }
30
45
# '
31
46
# ' @export
32
47
createDetailedCovariateSettings <- function (analyses = list ()) {
@@ -57,6 +72,23 @@ createDetailedCovariateSettings <- function(analyses = list()) {
57
72
# ' @return
58
73
# ' An object of type \code{covariateSettings}, to be used in other functions.
59
74
# '
75
+ # ' @examples
76
+ # ' \dontrun{
77
+ # ' analysisDetails <- createAnalysisDetails(analysisId = 1,
78
+ # ' sqlFileName = "DemographicsGender.sql",
79
+ # ' parameters = list(analysisId = 1,
80
+ # ' analysisName = "Gender",
81
+ # ' domainId = "Demographics"),
82
+ # ' includedCovariateConceptIds = c(),
83
+ # ' addDescendantsToInclude = FALSE,
84
+ # ' excludedCovariateConceptIds = c(),
85
+ # ' addDescendantsToExclude = FALSE,
86
+ # ' includedCovariateIds = c())
87
+ # ' covSettings <- createDetailedTemporalCovariateSettings(analyses = analysisDetails,
88
+ # ' temporalStartDays = -365:-1,
89
+ # ' temporalEndDays = -365:-1)
90
+ # ' }
91
+ # '
60
92
# ' @export
61
93
createDetailedTemporalCovariateSettings <- function (analyses = list (),
62
94
temporalStartDays = - 365 : - 1 ,
@@ -144,6 +176,12 @@ createAnalysisDetails <- function(analysisId,
144
176
# ' @return
145
177
# ' An object of type \code{covariateSettings}, to be used in other functions.
146
178
# '
179
+ # ' @examples
180
+ # ' \dontrun{
181
+ # ' covSettings <- createDefaultCovariateSettings()
182
+ # ' detailedSettings <- convertPrespecSettingsToDetailedSettings(covariateSettings = covSettings)
183
+ # ' }
184
+ # '
147
185
# ' @export
148
186
convertPrespecSettingsToDetailedSettings <- function (covariateSettings ) {
149
187
json <- .toJson(covariateSettings )
@@ -170,6 +208,15 @@ convertPrespecSettingsToDetailedSettings <- function(covariateSettings) {
170
208
# ' @return
171
209
# ' An object of type \code{covariateSettings}, to be used in other functions.
172
210
# '
211
+ # ' @examples
212
+ # ' \dontrun{
213
+ # ' covSettings <- createDefaultCovariateSettings(includedCovariateConceptIds = c(1),
214
+ # ' addDescendantsToInclude = FALSE,
215
+ # ' excludedCovariateConceptIds = c(2),
216
+ # ' addDescendantsToExclude = FALSE,
217
+ # ' includedCovariateIds = c(1))
218
+ # ' }
219
+ # '
173
220
# ' @export
174
221
createDefaultCovariateSettings <- function (includedCovariateConceptIds = c(),
175
222
addDescendantsToInclude = FALSE ,
@@ -207,6 +254,15 @@ createDefaultCovariateSettings <- function(includedCovariateConceptIds = c(),
207
254
# ' @return
208
255
# ' An object of type \code{covariateSettings}, to be used in other functions.
209
256
# '
257
+ # ' @examples
258
+ # ' \dontrun{
259
+ # ' covSettings <- createDefaultTemporalCovariateSettings(includedCovariateConceptIds = c(1),
260
+ # ' addDescendantsToInclude = FALSE,
261
+ # ' excludedCovariateConceptIds = c(2),
262
+ # ' addDescendantsToExclude = FALSE,
263
+ # ' includedCovariateIds = c(1))
264
+ # ' }
265
+ # '
210
266
# ' @export
211
267
createDefaultTemporalCovariateSettings <- function (includedCovariateConceptIds = c(),
212
268
addDescendantsToInclude = FALSE ,
0 commit comments